AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Why is my script only running once?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
beal



Joined: 03 Mar 2007
Posts: 10

PostPosted: Sun Nov 04, 2007 2:48 pm    Post subject: Why is my script only running once? Reply with quote

I'm new to writing scripts, so any advice is appreciated. Basically, I want the script to, when my mouse is hovered over a link and a hotkey is pressed to copy that link location and then paste it in a Gtalk window and then return to the Firefox window. I have succeeded in getting it to post the link, but it will only run once when the hotkey is pressed. Pressing the hotkey a second time does nothing. In addition, it does not return to the Mozilla Firefox window after pasting the link.

Thanks Smile

Code:
^Q::
MouseClick, right
Send {Down}{Down}{Down}{Down}{Down}{Down}{Down}
Send {Enter}
IfWinExist windowtitlehere
{
    WinActivate
}
else
{
    Run gtalk:chat?jid=gtalkaddress@gmail.comhere
    WinWait windowtitlehere
    WinActivate
}
Send ^V
Send {Enter}
WinWait Mozilla Firefox ahk_class MozillaUIWindowClass
WinActivate
return
Back to top
View user's profile Send private message
beal



Joined: 03 Mar 2007
Posts: 10

PostPosted: Sun Nov 04, 2007 3:22 pm    Post subject: Reply with quote

Nevermind, fixed it with a

SetTitleMatchMode 2

before everything....Thanks!
Back to top
View user's profile Send private message
kimbledon



Joined: 28 Sep 2007
Posts: 26

PostPosted: Mon Nov 05, 2007 7:06 pm    Post subject: Reply with quote

You can replace
Code:
Send {Down}{Down}{Down}{Down}{Down}{Down}{Down}


with
Code:
Send {Down 7}


Smile
Back to top
View user's profile Send private message
icefreez



Joined: 15 May 2007
Posts: 39

PostPosted: Mon Nov 05, 2007 7:32 pm    Post subject: Reply with quote

oOo I did not know that Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group