Jump to content

Recommended Posts

Posted

How do I change the third line in the code

so that I get ridd of thoose nasty spaces before

officexp.iso and 1.

Tried to put more spaces between 'miso.exe' & $Image', didnt work, tried added 'miso.exe' & ' ' & $Image.

Didn't work. Any idea?

$Image= ' OfficeXP.iso '
$Drivernumber= ' 1 '
$get = Run(@ScriptDir & '\' & 'miso.exe' & $Image & '-b' & $Drivernumber,"",$STDOUT_CHILD, @SW_HIDE)
Posted

Sorry for my bad english, maybe hard to understand.

The thing is that the spaces in $Image= ' OfficeXP.iso ' is

needed in the third line. The dos command requier space between

miso.exe and OfficeXP.iso.

In my final script, there is no spaces before OfficeXP.iso, I just putted

them temporary to get the third line working.

Posted (edited)

By convention, most people leave extra spaces, trailing slashes, etc. OFF of their variables and then include them in any assembled string as required:

$Image= 'OfficeXP.iso'
$Drivernumber= '1'
$get = Run(@ScriptDir & '\miso.exe ' & $Image & ' -b ' & $Drivernumber,"",$STDOUT_CHILD,@SW_HIDE)oÝ÷ ØÌ©z»(©i­çÞ­éÜz+-¡«,zfåzØ^²Ú⥪ڵérjëh×6$sExtCmd = @ScriptDir & '\miso.exe ' & $Image & ' -b ' & $Drivernumber
$get = Run($sExtCmd,"",$STDOUT_CHILD, @SW_HIDE)

That adds an extra line, but makes debugging and logging much easier because you can ConsoleWrite() or MsgBox() the string if you suspect it isn't coming out right.

:)

Edit: Correcting typos, while working around the forum bug... :)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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
×
×
  • Create New...