I access an IP camera with Internet Explorer using three input parameters: IP address, ID, password. Thus far, I have been unable to do this with a single Autohotkey script. When line 1 executes, a window from the camera asks for ID and password. The camera program waits for this input and the script does not progress to Lines 2 and 3. When an ID and password are typed in manually, or entered by running a second script, camera operation proceeds normally. Is there a way to run the equivalent of lines 1,2, and 3 in a single script?
line 1 Run "C:\Program Files\Internet Explorer\iexplore.exe " ‘IP-address’
line 2 Send,’ID’{enter}
line 3 Send,’password’{enter}
I’m obviously new to Autohotkey and hope there is an elementary solution to this problem. All help much appreciated.
Combining scripts
-
- Posts: 4
- Joined: 23 Mar 2020, 17:28
-
- Posts: 4
- Joined: 23 Mar 2020, 17:28
Re: Combining scripts
Update: The following script can access and run the IP camera but requires two keystrokes: first the script hot key and a second keystroke responding to the MsgBox. Removing the MsgBox lets the script open the camera log-in window but it does not enter the ID and PW. Does anyone see how to access and run the camera app with just one keystroke?
Run "C:\Program Files\Internet Explorer\iexplore.exe " ‘IP-address’
MsgBox,
Send,’ID’{enter}
Send,’PW’{enter}
Run "C:\Program Files\Internet Explorer\iexplore.exe " ‘IP-address’
MsgBox,
Send,’ID’{enter}
Send,’PW’{enter}
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: Combining scripts
Hello, Jim!
In response as to what you are wanting to happen, I suggest looking into these commands here: Sleep and Hotkeys.
If these do not work or do not suit your needs, the entire AutoHotkey documentation is readily available, if you cannot find what you're looking for, up at the top left of the docs there is Content, Index, and Search.
Using Index, you can search for a particular word or phrase and it will try its best to find what you're looking for.
If you are lost, you can reply to this thread and someone will get back with you as soon as possible.
Cheers, Delta.
In response as to what you are wanting to happen, I suggest looking into these commands here: Sleep and Hotkeys.
If these do not work or do not suit your needs, the entire AutoHotkey documentation is readily available, if you cannot find what you're looking for, up at the top left of the docs there is Content, Index, and Search.
Using Index, you can search for a particular word or phrase and it will try its best to find what you're looking for.
If you are lost, you can reply to this thread and someone will get back with you as soon as possible.
Cheers, Delta.
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
-
- Posts: 4
- Joined: 23 Mar 2020, 17:28
Re: Combining scripts
Thank you for responding. I am trying to use AHK to run an application that requires logon credentials.
This line opens the application and its logon window.
RunWait "C:\Program Files\Internet Explorer\iexplore.exe " 10.0.0.111
The next lines do not send values to the open application window.
Send,admin{enter}
Send,123{enter}
Sleeping up to 10000 millisecs before the send lines does not help.
Invoking the script via hotkey does not help.
Inserting a MsgBox line before the Send lines helps but the MsgBox requires a response. I wish the script to work automatically without having to respond.
In 12/28/16 Post Tomasc reported a very similar problem, but no solution was offered.
I have searched the forum for help but am still lost.
This line opens the application and its logon window.
RunWait "C:\Program Files\Internet Explorer\iexplore.exe " 10.0.0.111
The next lines do not send values to the open application window.
Send,admin{enter}
Send,123{enter}
Sleeping up to 10000 millisecs before the send lines does not help.
Invoking the script via hotkey does not help.
Inserting a MsgBox line before the Send lines helps but the MsgBox requires a response. I wish the script to work automatically without having to respond.
In 12/28/16 Post Tomasc reported a very similar problem, but no solution was offered.
I have searched the forum for help but am still lost.
- Delta Pythagorean
- Posts: 627
- Joined: 13 Feb 2017, 13:44
- Location: Somewhere in the US
- Contact:
Re: Combining scripts
Hello again, Jim.
My recommendation is to use ControlClick to focus the fields and then use ControlSend to send the login information.
An example looks like so:
If you have any further questions, again, I or someone else will be around to assist in any way we can!
Cheers, Delta.
My recommendation is to use ControlClick to focus the fields and then use ControlSend to send the login information.
An example looks like so:
Code: Select all
; ControlClick, [Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText]
ControlClick, x45 y30, Login Infomation,, Left, 1
; ControlSend, [ Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlSend,, foobar, Login Infomation
Cheers, Delta.
[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat
Who is online
Users browsing this forum: OrangeCat and 278 guests