AutoHotkey Community

It is currently May 26th, 2012, 1:17 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: November 22nd, 2008, 6:00 pm 
Offline

Joined: November 18th, 2008, 3:32 am
Posts: 10
Quick question from a rookie:

trying to make AHK press a OK button on a popup window in Firefox.

My code is: IfWinExist ahk_class MozillaDialogClass Send {Enter}

But it only works when i start the script, i need it to do it any time.

[Title edited. Please write descriptive titles for your topics. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 6:30 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
put it in a loop

Code:
loop
{
your action
sleep 50
}

the sleep makes it work smoother


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 7:06 pm 
Offline

Joined: November 18th, 2008, 3:32 am
Posts: 10
Frankie wrote:
put it in a loop

Code:
loop
{
your action
sleep 50
}

the sleep makes it work smoother


Thx alot, it works 99% , but since this is a OK/Cancel box, how would i do this to press the Button marked OK??

ALSO looking to make the middle mousebutton close windows/programs from the taskbar,


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 7:08 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
change send {enter} to send {left}{enter}
that should work but im not sure


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2008, 10:32 pm 
Offline

Joined: February 17th, 2008, 8:52 pm
Posts: 314
For for middle click you might get some ideas from thispost. Check out Serenity's response.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 23rd, 2008, 5:01 pm 
Offline

Joined: November 18th, 2008, 3:32 am
Posts: 10
Frankie wrote:
change send {enter} to send {left}{enter}
that should work but im not sure


Have found a problem with the code now, other popupwindows in firefox alse being affected.

How can i make it just press OK in certain windows "with spesific words/text) ??? Anyone?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2008, 12:05 am 
Offline

Joined: February 17th, 2008, 8:52 pm
Posts: 314
I don't have ahk on this box but you should be able to use IfWinActive, WinGetText, and Window Spy.

-- IfWinActive for popup title only
-- WinGetText ( I hope that is the command) to get text in window
-- Window Spy should tell you window title and window text


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2008, 1:25 am 
Offline

Joined: November 18th, 2008, 3:32 am
Posts: 10
vahju wrote:
I don't have ahk on this box but you should be able to use IfWinActive, WinGetText, and Window Spy.

-- IfWinActive for popup title only
-- WinGetText ( I hope that is the command) to get text in window
-- Window Spy should tell you window title and window text


Thx for trying to help out, but im such a rookie, i kind of need a more finished "script".... :-) SO if you or anyone else can cutnpaste some lines that can press a specific button in a spesific window, ill would be sooooo greatfull.....


I kind of miss a "database" where i can find simple scripts like this.....


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Cerberus, Exabot [Bot], patgenn123, poserpro, Yahoo [Bot] and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group