Re: running another program with system / system_exec

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi

Success, this works

sequence showFile, sys_command = "" 
sequence string1 = "", string2 = "" 
 
showFile = GetItem(List13) 
showFile = GetText(Edit25) & "\\" & showFile 
 
--string2 = ShortFileName(showFile) 
 
--sys_command = '\"' & GetText(Edit32) & '\" ' & GetText(Edit25) & "\\1054-20081022-7055-current-21456-i.jpg"  & '"' 
 
showFile = GetText(Edit25) & "\\1054-20081022-7055-current-21456-i.jpg" 
 
string1 = "\"" & GetText(Edit32) & "\"" 
string2 = "\"" & showFile & "\"" 
 
puts(1, string1 & "\n") 
puts(1, string2 & "\n") 
puts(1, sys_command & "\n") 
 
system_exec(string1 & " " & string2, 0) 
 

The puts'd strings are fully quoted, and there are spaces in the executables path\filename.

BUT - if you put spaces in the parameters path\filename then the program opens, but the program fails to open the file. Having said that I am using an older version of paint shop pro - so it may be ok with a more modern image viewer - I shall try IrfanView, and report back.

Thanks to all those that pointed me in the right direction. Perhaps this should be added to the manual as system_exec gotchas.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu