Hi
I'm new to Macro Scheduler and I'm trying to select File/Open File from an application menu and then select a file 'testSQL.sql' and click the Open button.
This is a snippet of what i have so far...
//Tab 7 times to get to the Connect button
Press Tab*7
//Click the 'Connect' button
Press Enter
//Open file 'SQL to test db connectivity.sql'
Let>SQLfilename=C:\Projects\testSQL.sql
//Open the Windows Open Dialog
Press ALT
Send>fo
Release ALT
Now how do I select the file and click the open button?
Open a file from the Open dialog Window
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Just send the filename to it and press enter:
I assume here that the open dialog is called "Open File" - you may have to change that if the title is something different.
Usually however you can open a file in an app via the command line:
ExecuteFile>C:\Projects\testSQL.sql
Or
Run Program>c:\...\someapp.exe C:\Projects\testSQL.sql
Thus avoiding sending keystrokes to the file open dialog.
But that all depends on the app in question.
Code: Select all
//Open file 'SQL to test db connectivity.sql'
Let>SQLfilename=C:\Projects\testSQL.sql
//Open the Windows Open Dialog
Press ALT
Send>fo
Release ALT
WaitWindowOpen>Open File
Send>SQLfilename
Press Enter
Usually however you can open a file in an app via the command line:
ExecuteFile>C:\Projects\testSQL.sql
Or
Run Program>c:\...\someapp.exe C:\Projects\testSQL.sql
Thus avoiding sending keystrokes to the file open dialog.
But that all depends on the app in question.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Wow! I like the prompt reply on the post.
But now I'm having problem before it gets to File/Open File step
In more details:
1) I launch Toad for Oracle which pop-up two windows. The focus window is the one to enter the schema name, id etc then i click the connect button
2) After the connect that popup window goes away and the focus goes on the window at the back this is where I want to open my sql file from the menu
//Wait for Toad for Oracle Window to be ready
WaitWindowOpen>Toad for Oracle*
//Set focus on Toad for Oracle Window
SetFocus>Toad for Oracle*
//Open the Open File Dialog Window
Press ALT
Send>fo
Release ALT
//Open file 'SQL to test CMRIdb connectivity.sql'
I run the step in debugging and it's failing on getting focus on the Toad for Oracle Window. any idea!
But now I'm having problem before it gets to File/Open File step
In more details:
1) I launch Toad for Oracle which pop-up two windows. The focus window is the one to enter the schema name, id etc then i click the connect button
2) After the connect that popup window goes away and the focus goes on the window at the back this is where I want to open my sql file from the menu
//Wait for Toad for Oracle Window to be ready
WaitWindowOpen>Toad for Oracle*
//Set focus on Toad for Oracle Window
SetFocus>Toad for Oracle*
//Open the Open File Dialog Window
Press ALT
Send>fo
Release ALT
//Open file 'SQL to test CMRIdb connectivity.sql'
I run the step in debugging and it's failing on getting focus on the Toad for Oracle Window. any idea!
I don' have your app so I can't test this but maybe there is another non-visible window that is also named "Toad for Oracle something something". Try using the exact name for the window you want focused and remove the asterisk from the setfocus line.
Eg.
//Wait for Toad for Oracle Window to be ready
WaitWindowOpen>Toad for Oracle
//Set focus on Toad for Oracle Window
SetFocus>Toad for Oracle
Eg.
//Wait for Toad for Oracle Window to be ready
WaitWindowOpen>Toad for Oracle
//Set focus on Toad for Oracle Window
SetFocus>Toad for Oracle