Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-21-2012, 07:08 AM
swasde swasde is offline
Registered User
 
Join Date: Jun 2007
Location: Germany
Posts: 9
Question FileOpenDialog lost focus

I am using vbscript to read some textfiles with the fileopendialog.

Sometimes it happens that den dialogbox appears behind some other windows (Outlook and so on).
Is there a possibility to set the focus via scripting command to the opendialog?



SecureCRT 6.7.2
Reply With Quote
  #2  
Old 05-21-2012, 07:52 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi swasde,

Thanks for the question. It is not currently possible to set the focus for a dialog generated by SecureCRT.

What operating system are you using?

Do you have a specific set of steps you can use to reproduce the issue?

How are you running the script?

Would you be able to post your code or an example of your code?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 05-22-2012, 05:13 AM
swasde swasde is offline
Registered User
 
Join Date: Jun 2007
Location: Germany
Posts: 9
Hi Todd,

Thanks for the information. So it is at the moment not

- What operating system are you using?
We are using Windows 2003

- Do you have a specific set of steps you can use to reproduce the issue?
I think the problem happens when the Dialogbox is not in front of the main
window of SecureCRT. When it was moved in the past to an other position
it will occur the next time behind some other windows.

- How are you running the script?
The script is started from the buttonbar in the terminal window

Here is a part of the code:


Set fso = CreateObject("Scripting.FileSystemObject")
Referenzfile_Import = True
' Dateidialog anzeigen
FilePath = crt.Dialog.FileOpenDialog("Bitte das File mit den Referenzkeys auswählen", "Öffnen", "", "Referenzkey Files (*.kdf)|*.kdf|Text Files (*.txt)|*.txt|Alle Files (*.*)|*.*|")
' Wenn Filepath keinen Inhalt hat wurde Abbruch betätigt, daher auch Abbruch der Funktion
If FilePath = "" Then
Referenzfile_Import = False
Exit Function
End If
' KDF-Datei öffnen
Set File = fso.OpenTextFile (FilePath, ForReading, False)
crt.Session.SetStatusText("")
' Anzahl der Referenzkeys in der KDF-Datei ermitteln
intZeileRefFile = 0
Do While File.AtEndofStream <> True
strZeile = File.ReadLine
intZeileRefFile = intZeileRefFile + 1
Loop
File.Close
Reply With Quote
  #4  
Old 05-22-2012, 10:21 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi swasde,

Thanks for the information. I have not been able to reproduce this issue, but we are investigating it.

Is this a problem you can reproduce every time after moving the dialog that your script displays?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 05-31-2012, 03:17 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi swasde,

We have investigated this issue in more depth, and cannot reproduce it. Do you have a very specific set of steps you can use to reproduce the issue?

Are there particular programs that cause the pop-under behavior?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #6  
Old 06-20-2013, 02:56 AM
swasde swasde is offline
Registered User
 
Join Date: Jun 2007
Location: Germany
Posts: 9
Hi Todd,

i have tried to find out a way to reproduce this problem.

For editing the sourcecode i use Notepad++. If this window is not minimized and i start a script which uses the fileopendialog, the SecureCrt window and the dialogbox are behind the Notepad++ window.
Reply With Quote
  #7  
Old 06-20-2013, 08:06 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi swasde,

Thanks for the update. SecureCRT 6.7.2 is no longer in active development.

I tested your script in SecureCRT 7.1.1 with Notepad++ 6.6.3, and I still cannot reproduce the issue.

We are going to need an exact set of steps from the point that you launch SecureCRT and Notepad++ to the point that you run the script and see the issue if you can reproduce the issue in SecureCRT 7.1.1.

More information about your environment so we can possibly spot any differences might be helpful.

Are you still running Windows 2003?

Do you have any window management software installed on your system?

Would you post a screenshot of the issue when you see it?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 10:50 AM.