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 

Trying to learn - auto dialer script

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



Joined: 02 Jul 2008
Posts: 2
Location: Maine - USA

PostPosted: Wed Jul 02, 2008 3:30 am    Post subject: Trying to learn - auto dialer script Reply with quote

Im trying to learn...

Thought Id write a simple script where I could:

highlight a phone number,
hit a hot key (windows/space)
have the script copy the number,
open XP phone dialer,
open new dial dialog box,
paste the phone number
and dial the phone number for me...

I got this script to copy the phone number:

#space:: ^c


I then tried to open dialer.exe and got stuck...

#space::
^c
Run dialer.exe
return

I need a hint please as to what's wrong. I can open dialer with the run dialer.exe command. However when I put the two together it only copies the number.


Thanks
Scott
Back to top
View user's profile Send private message
Gosugenji



Joined: 07 May 2008
Posts: 35
Location: In your Internets

PostPosted: Wed Jul 02, 2008 5:26 am    Post subject: Reply with quote

hmm.. try this..

Code:

#persistent

#space::
{
send, ^c
run dialer.exe
winwait , Phone Dialer
send !pi
winwait , ahk_class #32770
sendinput %clipboard%
send {enter}
}
Back to top
View user's profile Send private message
Scott



Joined: 02 Jul 2008
Posts: 2
Location: Maine - USA

PostPosted: Wed Jul 02, 2008 1:05 pm    Post subject: Reply with quote

Thanks. I couldnt get that to work but you did get me on the right track.

Code:

#space::
send, ^c
run, dialer.exe
winwait, Phone Dialer
send, !pi
winwait, Phone Dialer
send, ^v
send, {enter}
return


This works once dialer is open. If dialer is not open it freezes up. Any thoughts?

Thanks
Scott
Back to top
View user's profile Send private message
HugoV



Joined: 27 May 2007
Posts: 499

PostPosted: Wed Jul 02, 2008 1:30 pm    Post subject: Reply with quote

Look into http://www.autohotkey.com/docs/commands/IfWinExist.htm
something like this
Code:
IfWinNotExist, putcorrecttitlehere
Run Dialer.exe
WinActivate, putcorrecttitlehere
; the rest of your script
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