Mystery - running in Dev Vs Exe file

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

Mystery - running in Dev Vs Exe file

Post by BlackWisdom » Tue Jul 12, 2005 11:45 pm

I have only seen this in the latest version of Macro Scheduler:

I will design a script run it from the Dev environment - it works great, but when I compile it and run it - I get a series of errors on lines of logic that was not generating errors prior to compiling.

Or the reverse I will design a script run it in the Dev environment - it generates errors - but when I compile it - it works fine.

I have scanned for viruses and spyware - any idea..??? has anyone else seen this???

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Wed Jul 13, 2005 12:30 am

Any Chance Of Posting The Script So That We Can Have A Look?
FIREFIGHTER

BlackWisdom
Pro Scripter
Posts: 58
Joined: Thu Oct 16, 2003 12:53 am

Post by BlackWisdom » Wed Jul 13, 2005 2:42 am

Hi micheal ,

actually there has been numerous scripts - but here is one:


ReadLn>FolderTotal.txt,file
separate>file,%CRLF%,num
Let>k=1
repeat>k
Let>k=k+1
add>num_1,num_%k%
until>k,num_count

WLN>sum.txt,%num_1%


the error is caused by the add> statement (6th lind down)

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jul 13, 2005 4:29 am

Need to define num_%k% separately, something like this:

Code: Select all

Let>numadd=num_%k%
Add>num_1,numadd
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Jul 13, 2005 4:44 am

Hi Bob, Michael and Black Wisdom

I agree that sometimes a variable needs to be defined twice when a sequential variable is involved.

I submitted this sample earlier today in response to a different question. It ran fine within Macro Scheduler. I tested it before posting. I will see what happens when I compile it tomorrow at work. I only have a non pro license to use at home.

Later.
Dick

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Jul 13, 2005 4:49 am

I did not create a file of numbers, I just hard coded some numbers for test purposes. I found that if num_1 was not defined, that I got the error message. So I did Let>num_1=0 and message went away, Add worked OK.

I figured if I did a real Separate> command that it would work OK without having to define it.

Try doing a Single Step with Watch List on, and look at the values of num_?? before you get to the Add command. Perhaps Separate is the real problem?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts