RogerRabbitsClone Posted June 16, 2010 Posted June 16, 2010 ive tried run ("notepad.exe") run ("Notepad.exe") run ("C:\WINDOWS\System32\notepad.exe"). i was originally trying the Fileopen command, but it wasnt working. FileOpen("C:\Documents and Settings\dtpstaff\Desktop\DeleteAfterScriptFinishes.txt") FileOpen("DeleteAfterScriptFinishes.txt") (both the above with ', 0' at the end) wtf am i doing wrong??? this is basicly copying the text underneath "First Name" and then im going to paste it into another program. run ("notepad.exe") WinWaitActive ("[CLASS:Notepad]") send ("^o") send ("DeleteAfterScriptFinishes.txt") send ("{ENTER}") WinWaitActive ("[CLASS:Notepad]") send ("{altdown}") send ("E") send ("F") send ("{ALTUP}") sleep (300) send ("!N") sleep (300) send ("first name") send ("!F") send ("{esc}") sleep (300) send ("{right}") sleep (300) send ("{SHIFTDOWN}") sleep (300) send ("{down}") sleep (300) send ("{shiftup}") sleep (300) send ("^C") send ("!{tab}") <--a good way to start you day
JohnOne Posted June 16, 2010 Posted June 16, 2010 Try ShellExecute("Notepad.exe") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
stampy Posted June 16, 2010 Posted June 16, 2010 Your run command is correct and should work. I'm not sure why it's not. However, your trying to read out of a file, try something like this... $hFile = FileOpen("C:\Documents and Settings\dtpstaff\Desktop\DeleteAfterScriptFinishes.txt",0) $sFileText = FileRead($hFile) FileClose($hFile) ;now search your text for 'First Name' $pos = StringInStr($sFileText,'First Name') +10 ;get the position of First String - add 10 for the lenth of the search string ;read everything after 'First Name' $newTxt = StringRight($sFileText,StringLen($sFileText)-$pos)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now