GEOSoft Posted October 10, 2009 Posted October 10, 2009 (edited) The nice part of doing it with the code I gave you is that the Path is only viable while the script is running. It's not a permanent change like our old DOS days when the safest method was to put everything into the Path. I don't think I ever did find a limit to the old DOS Paths though.Ahh, the wonderful world of a corporate cog.Corporations are amazing operations and the larger they get the more amazing it is that they are able to exist at all.I remember years ago when I had several weekly reports to send to Head Office. Along came the inevitable belt tightening and it looked like heads would be rolling at Corporate HQ. What happened? My paperwork load almost doubled overnight because of "If I can generate enough forms that nobody (including myself) understands then they will have to keep me because all of my forms are just too important." mentality. That worked for a couple of months until some of us noticed that one of the new forms was exactly the same as one of the forms we were already doing weekly. That's simple, just copy the first form and send it to two different people. Not so fast! The second form had a different form number and you had to send the right one to the right person.Now back to our regularly scheduled topic. Edited October 10, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
enaiman Posted October 11, 2009 Posted October 11, 2009 Ok - back to topic It took me a while to figure how it might work (trial and error). I did a test with Notepad exe placed in a folder with a space in the name, and I tried to open a document - also from a similar type of folder. This is how it worked for me: Run(@ComSpec & " /c " & '""d:\spec img\notepad.exe"" d:\spec img\test 2\tt.txt') based on this result - you might try: Run(@ComSpec & " /c " & '""c:\my editor\editor.exe"" -1 C:\XXX\YY ZZ\AA_CBBB\my_src.cpp -n143') It might not work; I can't test it and my "common sense" is telling me that it shouldn't work - but it's worth a try if you want. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
Valuater Posted October 11, 2009 Posted October 11, 2009 Did you or did you not try FileGetShortName() as I suggested? 8)
herewasplato Posted October 12, 2009 Posted October 12, 2009 @enaiman, Why use @ComSpec [size="1"][font="Arial"].[u].[/u][/font][/size]
enaiman Posted October 12, 2009 Posted October 12, 2009 @herewasplato good question I'just got an example from above and played with ... didn't think too much SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
TurionAltec Posted October 12, 2009 Posted October 12, 2009 @enaiman: and why did you surround it with single quotes AND use double-double quotes? ConsoleWrite('""c:\my editor\editor.exe"" -1 C:\XXX\YY ZZ\AA_CBBB\my_src.cpp -n143'&@CRLF) ConsoleWrite('"c:\my editor\editor.exe" -1 C:\XXX\YY ZZ\AA_CBBB\my_src.cpp -n143'&@CRLF) ""c:\my editor\editor.exe"" -1 C:\XXX\YY ZZ\AA_CBBB\my_src.cpp -n143 "c:\my editor\editor.exe" -1 C:\XXX\YY ZZ\AA_CBBB\my_src.cpp -n143
WhyTea Posted December 23, 2009 Author Posted December 23, 2009 Did you or did you not try FileGetShortName() as I suggested?8)Sorry for taking so long to reply. Been taking holiday for a while. It indeed works with FileGetShortName().Thanks and Merry X'mas!/Why Tea
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