Re: xbasic code help
Close, but according to Windows convention for long paths, the exe and the argument should both be quoted, so you need one more.
In some cases you don't need the quotes around each element, but adding them even when not needed is not a detriment.
Getting the quotes correct is always a challenge and using a quoted character string is easier. Another potential solution for long path names is to convert the path with file.longname_to_shortname() to convert a long name to a short name.
In this case, we still don't know if 4X6.exe even accepts an argument on startup. Many programs do not. If you can build a Windows shortcut that works, then the method described will work. But if it won't work in a shortcut, it won't work in sys_shell(). Until it is verified that a shortcut works, trying to force it to work in sys_shell() is an exercise in futility.
Another option is to build an old DOS bat file and then run that with sys_shell("filename.bat",2). A batch file may give more options and can be created before the sys_shell() and then deleted after it runs. A bit of a kludge, but a solution sometimes required for unusual problems.
Close, but according to Windows convention for long paths, the exe and the argument should both be quoted, so you need one more.
Code:
sys_shell(\""C:\Program Files\HollywoodPM\Drops\4x6.exe[COLOR="Red"]\"[/COLOR] \"C:\Program Files\HollywoodPM\Drops\Trigger.jpg\"",1)
Getting the quotes correct is always a challenge and using a quoted character string is easier. Another potential solution for long path names is to convert the path with file.longname_to_shortname() to convert a long name to a short name.
In this case, we still don't know if 4X6.exe even accepts an argument on startup. Many programs do not. If you can build a Windows shortcut that works, then the method described will work. But if it won't work in a shortcut, it won't work in sys_shell(). Until it is verified that a shortcut works, trying to force it to work in sys_shell() is an exercise in futility.
Another option is to build an old DOS bat file and then run that with sys_shell("filename.bat",2). A batch file may give more options and can be created before the sys_shell() and then deleted after it runs. A bit of a kludge, but a solution sometimes required for unusual problems.
Originally posted by Marcel Kollenaar
View Post
Comment