uznut Posted June 14, 2004 Posted June 14, 2004 Hey i need to make autoit open a txt file in excel and also they file changes all the time so i tryed to make an input box but when i put the $00= whatever i gave me errors when excel opens. it says master business_$00 does not exsit $00 = InputBox("FENCIN", "Please type in the correct file number", "", "", -1, -1, 441, 291) Run(@ComSpec & " /c excel.exe " & @ScriptDir & "\master business_$00.txt") Sleep("5000") Send("!fa") Send("Fincenb") Send("{TAB}") Send("c")
CyberSlug Posted June 14, 2004 Posted June 14, 2004 Run(@ComSpec & " /c excel.exe " & @ScriptDir & "\master business_" & $00 & ".txt")See FAQ #9 (also available in the AutoIt help file) for an explanation Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
sugi Posted June 14, 2004 Posted June 14, 2004 $00 = " and this is the variable" MsgBox(4096, "How to join strings", "Just a demonstration on how to join strings: This is the text" & $00 & ". Followed by another sentence.") Adjust your Run() command as above.
Guest Guest Posted June 14, 2004 Posted June 14, 2004 Run(@ComSpec & " /c excel.exe " & @ScriptDir & "\master business_ "& $00 &".txt") i got it to read the $00 but it splits them up i tries to open master.txt then business_.txt then the $00.txt. im gettin confused
uznut Posted June 14, 2004 Author Posted June 14, 2004 Run(@ComSpec & " /c excel.exe " & @ScriptDir & "\master business_ "& $00 &".txt")i got it to read the $00 but it splits them up i tries to open master.txt then business_.txt then the $00.txt. im gettin confused. oops forgot to login
CyberSlug Posted June 14, 2004 Posted June 14, 2004 Oops, forgot about spaces in the path.... Try something this: $path = '"' & @ScriptDir & '\master business_' & $00 & '.txt' & '"' Run(@ComSpec & " /c excel.exe " & $path) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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