Jump to content
Sign in to follow this  

notepad wont open "run" or "fileopen"

Recommended Posts


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")


(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

Share this post

Link to post
Share on other sites

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)
;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)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.