Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difficulty in running exe
#1
The following function compiles and runs properly under QM. However, I need to run it as .exe. The executable is created but when I run it, I get the message :
Quote:Error (RT) in <open "tempf10 /284">tempf10: invalid argument. <help #IDP_ERR>?

at statement
Quote:s.get(a[i] j-1 1)

I would appreciate your advice.

Function tempf10
Code:
Copy      Help
str dFold
rget dFold "dFold" "\B4SES" RegMisc
ARRAY(str) a
GetFilesInFolder a dFold "" 0 2
str star s
a.sort
int i j
for i 0 a.len
;,out a[i]
,DateTime t=val(a[i] 1 _i) ;;use DateTime for times. Use long for size.
,str sPath=a[i]+_i+1
;,out sPath
,j=find(a[i] ".zip")
,s.get(a[i] j-1 1)
,star.from(s ":")
,str param=F"x -t7z  {sPath}  -o{star}  "
,
,str sl.formata("%s[]" param)
,
sl.setfile("C:\tmp\hlp.txt")
run "C:\tmp\hlp.txt"

MES mm
mm.style="YN?"
mm.timeout=5
i=mes("Restart" "Confirm" mm)

;
#2
str.get most often invalid argument error is when from is negative.
#3
Thank you. You are absolutely right : this is the case! What I have to find out now, is why the negative value (-1) appears only in the exe version. Best regards.
#4
I am sorry for having disturbed you. The problem was due to the global variable "RegMisc" that it was not defined in the exe version. Many thanks again.


Forum Jump:


Users browsing this thread: 1 Guest(s)