AutoHotkey Community

It is currently May 26th, 2012, 5:53 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: February 21st, 2008, 8:19 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Idea:
I will highlight my next client's name from my scheduling program.
I would like to find all their files by executing a program I use called ESP. I would like to find their files based on their first and last name.

Typical Data
Code:
Lastname, Firstname 0 pension funds down ON number version clientnumber





#Persistent
^,::
^c
delay = 100
"Press F11"
delay = 500
Send "the clipboard"
Send {Enter}
Return


Last edited by drmurdoch on February 21st, 2008, 9:11 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2008, 8:25 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Press F11 = F11 (I think).


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Forgot some parts
PostPosted: February 21st, 2008, 8:33 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
from my older post-

Code:
Copy everything to clipboard (before the script)
Press control+F11 to execute the script
Save the Clipboard.
Find the first charcter that is the number 0, then copy everything before the number 0 (not including)
strip out any commas.
F11 key
Wait for application.
"Type" (not paste) the string into the application (ie. not just paste).
Return to the initial clipboard + add date (format - Jan 28, 2008) to the end.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: From Titan
PostPosted: February 21st, 2008, 8:35 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
It can all be done using the commands: FileAppend, StringMid, StringReplace, Send, WinWait, ControlSend/send, EnvAdd.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2008, 8:39 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
;Press control+F11 to execute the script (key text is highlighted).
^F11::
;Copy everything to clipboard
^c
;Save the Clipboard as a variable
ClipSaved := ClipboardAll
;Find the first charcter that is the number 0, then copy everything before the number 0 (not including)
Needle = 0
StringGetPos, pos, ClipboardAll, %Needle%
if pos >= 0
MsgBox, FYI, The string was found at position %pos%.
StringLeft, PersonName, ClipboardAll, pos
;strip out any commas.
;not required.
;F11 key
F11
;Wait for application.
delay = 600
;"Type" (not paste) the string into the application (ie. not just paste).
Send PersonName
;Return to the initial clipboard + append date (format - Jan 28, 2008) to the end.
Clipboard := ClipSaved + "the date"


Last edited by drmurdoch on February 21st, 2008, 9:05 am, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2008, 8:45 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Typical Entry
10:00 Potter, Harry 0 follow up ON 266012096 9999

0 is the zero


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2008, 9:09 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#Persistent
^F11:: ;Press control+F11 to execute the script (key text is highlighted).
Send ^c ;Copy everything to clipboard
clipboard = %clipboard%
ClipSavage := clipboard ;Save the Clipboard as a variable ClipSavage.
MsgBox, FYI, The string was found whatever %clipboard%
delay = 9000
;Find the first charcter that is the number 0, then copy everything before the number 0 (not including)
Needle = 0
StringGetPos, pos, clipboard, 0
if pos >= 0
MsgBox, FYI, The string was found at position %pos%.
StringLeft, PersonName, clipboard, pos ; Assign everything before the 0 to PersonName.
;strip out any commas. ;not required.
Send F11 ;F11 key
delay = 600 ;Wait for application.
Send PersonName ;"Type" (not paste) the string into the application (ie. not just paste).
Clipboard := ClipSaved
Return


Last edited by drmurdoch on February 21st, 2008, 9:56 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2008, 9:55 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
seems to work but Send F11 doesn't trigger my ESP app.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2008, 8:19 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
you need to send the key {F11}, not the letters F 1 1.

Use
Code:
Send {F11}

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 4:44 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
Send {F11} ;F11 key
delay = 600 ;Wait for application.
Send %PersonName% ;"Type" (not paste) the string into the application (ie. not just paste).
Clipboard := ClipSaved
Return

-- almost working.
It is unreliable for unknown reasons.
Must be a focus issue.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 5:06 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
perhaps you can use some other way to wait for the application instead of a delay? are you waiting for a certain window to pop up? See WinWait, WinActivate, and WinWaitActive commands.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 5:29 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
i am waiting for a screen.

I think it popups up unmaximized sometimes.
or the on screen control + F11 sticks.

annoying.

Image

maybe I am not sending the text reliably.

It is a unique program in that you press F11 and start typing it sort of does not require focus.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 5:33 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
if you are worried about sending text reliably, try the different send modes (input, play, event, etc.) also, try messing with setkeydelay.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2009, 6:52 pm 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
I am a bit lost about getting this script to work.

SendInput %PersonName%

is unreliable (sometime it only will get one letter in the box I want it in).

and I can't seem to get the other options to work. :?: :oops:

Any more tips ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2009, 4:09 am 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
It copies it to the clipboard but often the paste doesn't work well, like it will only paste the first letter of the string.

:(


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, JSLover, patgenn123, Yahoo [Bot] and 66 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