Help loading browser and URL.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LAPIII
Posts: 669
Joined: 01 Aug 2021, 06:01

Help loading browser and URL.

22 Feb 2022, 12:10

This is my image upload script:

Code: Select all

#SingleInstance, Force
^+U::
Run, "C:\Program Files\Waterfox\waterfox.exe"
Sleep 600
SendInput postimages.org
SendInput {Enter}
Sleep 400
MouseMove, 964, 524
Click 964 524
return
This will open the browser, and maybe it will load the URL and click what it's supposed to. It will work if I use the hotkey twice. I tried to get past this by adding, after the third line:
WinWaitActive, "C:\Program Files\Waterfox\waterfox.exe". Why didn't this work? What are my options that I can try before I could implement ImageSearch.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Help loading browser and URL.

22 Feb 2022, 13:02

Hi! Try this.
Try to use u instead of U.
Don't use quotes in WinWaitActive
You don't need MouseMove here since Click moves the cursor too.

Code: Select all

#SingleInstance, Force
^+u::
Run, C:\Program Files\Waterfox\waterfox.exe postimages.org
WinWaitActive, Postimages ahk_exe waterfox.exe
Sleep 1000	; Give it some more time.
Click 964 524
return
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
LAPIII
Posts: 669
Joined: 01 Aug 2021, 06:01

Re: Help loading browser and URL.

22 Feb 2022, 13:50

Awesome, thanks @amateur+.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Help loading browser and URL.

22 Feb 2022, 14:50

You're welcome!
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
LAPIII
Posts: 669
Joined: 01 Aug 2021, 06:01

Re: Help loading browser and URL.

25 Feb 2022, 10:10

How can I make it that, when actives, Edge's hotkey will activate instead of the one for uploading in Waterfox, and when Edge isn't active then the upload hotkey proceeds to work?
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Help loading browser and URL.

25 Feb 2022, 11:54

Code: Select all

#IfWinNotActive ahk_exe msedge.exe
^+u::
Run, C:\Program Files\Waterfox\waterfox.exe postimages.org
WinWaitActive, Postimages ahk_exe waterfox.exe
Sleep 1000	; Give it some more time.
Click 964 524
return
#IfWinNotActive
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: feiy and 125 guests