I am trying to copy the url from one Explorer window to a URL box in another program.
SetFocus>HCSO Arrests - Windows Internet Explorer
Wait>0.68
GetTextAtPoint>423,232,strText,nCharPos
SetFocus>Alpha Five - [SearchEngine]
GetCaretPos>X,Y,0
MouseMove>x,y
Wait>1.86
strTextSend Character/Text>strText
MessageModal>%strtext%
The modal message dosen't show aanything. What am I missing?
Internet URL
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Make your life simpler: ALT+D puts keyboard focus in the address bar, so, all you need to do is:
//Focus IE
SetFocus>HCSO Arrests - Windows Internet Explorer
//Press ALT-D to get to address bar and select URL
Press ALT
Send>d
Release ALT
Wait>0.2
//Copy URL to clipboard
Press CTRL
Send>c
Release CTRL
//Now you can focus the other application and do CTRL-V to paste:
SetFocus>other_app_title
Press CTRL
Send>v
Release CTRL
//Or get the clipboard value into a variable and display it:
GetClipBoard>sURL
MessageModal>sURL
//Focus IE
SetFocus>HCSO Arrests - Windows Internet Explorer
//Press ALT-D to get to address bar and select URL
Press ALT
Send>d
Release ALT
Wait>0.2
//Copy URL to clipboard
Press CTRL
Send>c
Release CTRL
//Now you can focus the other application and do CTRL-V to paste:
SetFocus>other_app_title
Press CTRL
Send>v
Release CTRL
//Or get the clipboard value into a variable and display it:
GetClipBoard>sURL
MessageModal>sURL
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?
Internet URL
The following script works when run from the macro scheduler.
However when compiled the CNTRL g does not get executed.
//Focus IE
SetFocus>HCSO Arrests - Windows Internet Explorer
//Press ALT-D to get to address bar and select URL
Press ALT
Send>d
Release ALT
Wait>0.2
//Copy URL to clipboard
Press CTRL
Send>c
Wait>0.2
Release CTRL
//Now you can focus the other application and do CTRL-V to paste:
SetFocus>Alpha Five - [SearchEngine]
//Press CTL-D to get to address bar and select URL
Press CTRL
Send>d
Release CTRL
Wait>0.2
Press CTRL
Send>v
Release CTRL
Wait>0.2
Press CTRL
Send>g
Release CTRL
However when compiled the CNTRL g does not get executed.
//Focus IE
SetFocus>HCSO Arrests - Windows Internet Explorer
//Press ALT-D to get to address bar and select URL
Press ALT
Send>d
Release ALT
Wait>0.2
//Copy URL to clipboard
Press CTRL
Send>c
Wait>0.2
Release CTRL
//Now you can focus the other application and do CTRL-V to paste:
SetFocus>Alpha Five - [SearchEngine]
//Press CTL-D to get to address bar and select URL
Press CTRL
Send>d
Release CTRL
Wait>0.2
Press CTRL
Send>v
Release CTRL
Wait>0.2
Press CTRL
Send>g
Release CTRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
What does CTRL-g do? You might just need a longer delay between the ctrl-v and ctrl-g. The compiled version may be running a bit quicker. Make sure the correct window is focused and be sure to allow enough time for events to complete.
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?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: