What is the correct syntax

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mfauzim
Pro Scripter
Posts: 89
Joined: Wed Sep 13, 2006 10:57 am

What is the correct syntax

Post by mfauzim » Thu Sep 14, 2006 5:53 am

I vae this code:

SRT>ACT_TelRtn
Let>FrameName={""}
Let>FormName={"manactv"}
Let>FieldName={"txtTelNo"}
Let>FieldValue={%TelRtn%}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0


I got error at Let>FieldValue={%TelRtn%} where TelRtn is a variable which has dynamic content in a loop.

Appreciate any help
regards

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 14, 2006 7:10 am

Just:

Let>FieldValue=%TelRtn%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mfauzim
Pro Scripter
Posts: 89
Joined: Wed Sep 13, 2006 10:57 am

Still Not working

Post by mfauzim » Thu Sep 14, 2006 7:42 am

The debugger shows
FieldValue = %TelRtn%

so the form entry is %TelRtn%

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 14, 2006 7:47 am

Remove the spaces.

What does the debugger show is the value of TelRtn? That obviously also needs to be set.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mfauzim
Pro Scripter
Posts: 89
Joined: Wed Sep 13, 2006 10:57 am

Stil does not work

Post by mfauzim » Thu Sep 14, 2006 7:59 am

Already remove space, still not work debugger shows:
1. fieldvalue =%TelRtn%
2. TelRtn = "00356370496"

I am using the latest version
regards

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 14, 2006 8:41 am

Remove ALL spaces. Send your entire script. I am blind here.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mfauzim
Pro Scripter
Posts: 89
Joined: Wed Sep 13, 2006 10:57 am

code attach

Post by mfauzim » Thu Sep 14, 2006 8:48 am

Here the code: Really appreciate with all your help here: Dear sir, this code is related to my other issue in another thread. So there is 2 issues here s mention is the other thread.


// Generated by MacroScript WebRecorder 1.71
// Recorded on Wednesday, September 13, 2006, at 06:29 PM
LibLoad>IEAuto.dll,hIE
If>hIE=0
MessageModal>Could not load IEAuto.dll, make sure it is in the path or edit the LibLoad line.
Goto>end_script
EndIf

// Main routine
//---------------------------------
gosub>Asas_login
gosub>Asas_GetParaFromARTN

Label>MainLoop
GoSub>ARTN_GetExchList
GoSub>ARTN_GetAsasArtnList
nTelCount = 1
nTelMax= 1
Repeat>nTelCount
GoSub>Set_TelRtn
GoSub>ACT_TelRtn

Until>nTelcount, nTelMax

//Label>Cont_TelRtn
//goto>ACT_TelRtn
WAIT>2
goto>MainLoop




// All the subroutie is down here
//-------------------------------
SRT>ARTN_GetAsasArtnList
END>ARTN_GetAsasArtnList

SRT>ARTN_GetExchList
END>ARTN_GetExchList

SRT>Asas_login
//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1

LibFunc>hIE,CreateIE,IE[0],0

LibFunc>hIE,Navigate,r,%IE[0]%,http://201.11.112.4:3000/its
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
Let>TelRtn = "00356370496"
Let>FrameName={"ASASOptions"}
Let>FormName={"MyForm"}
Let>FieldName={"txtUserId"}
Let>FieldValue={"RTNASAS"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

Let>FrameName={"ASASOptions"}
Let>FormName={"MyForm"}
Let>FieldName={"txtUserPass"}
Let>FieldValue={"rtnasas9"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

Let>FrameName={"ASASOptions"}
Let>FormName={"MyForm"}
Let>TagValue={""}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

Let>FrameName={"ASASMenuOptions"}
Let>FormName={"MyForm"}
Let>TagValue={"Manual Activation"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay
END>Asas_login

SRT>Set_TelRtn
Let>TelRtn = "00356370496"
nTelCount = nTelCount + 1
END>Set_TelRtn

SRT>ACT_TelRtn
//label>ACT_TelRtn
Let>FrameName={""}
Let>FormName={"manactv"}
Let>FieldName={"txtTelNo"}
**BREAKPOINT**
Let>aTel = "00356370496"

// problem syntax here as in discussion forum
Let>FieldValue=%TelRtn%

LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

Let>FrameName={""}
Let>FormName={"manactv"}
Let>TagValue={"pbRefresh"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

Let>FrameName={""}
Let>FormName={"manactv"}
Let>FieldName={"cmbCommandId"}
Let>FieldValue={"Display Tel. Status"}
LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

Let>FrameName={""}
Let>FormName={"manactv"}
Let>TagValue={"pbActv"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue
//pushbutton>Microsoft Internet Explorer,OK
//
//Press Enter
WaitWindowOpen>Microsoft Internet Explorer*
SetFocus>Microsoft Internet Explorer*
Press Enter

WaitWindowOpen>ITS Message - Microsoft Internet Explorer
//WaitWindowOpen>Manual Switch Activation - Microsoft Internet Explorer
//SetFocus>Microsoft Internet Explorer
//Press Enter
wait>1
//Press Enter
LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"pbOk"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

//goto>Cont_TelRtn
END>ACT_TelRtn


SRT>Asas_GetParaFromARTN
END>Asas_GetParaFromARTN


SRT>ASAS_Logout
Let>FrameName={""}
Let>FormName={"manactv"}
Let>TagValue={"pbBack"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

Let>FrameName={"ASASMenuOptions"}
Let>FormName={"manactv"}
Let>TagValue={"ITS Login"}
LibFunc>hIE,ClickTag,r,%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[0]%
Wait>delay

LibFree>hIE
Label>end_script
END>ASAS_Logout

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 14, 2006 9:09 am

Remove the spaces and quotes in lines 60 and 100. They should be:

line 60:
Let>TelRtn=00356370496

Line 100:
Let>TelRtn=00356370496

And line 101 should be:

Let>nTelCount=nTelCount+1

REMOVE ALL SPACES

Strings do not need quotes unless they are in complex expressions or VBScript functions.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mfauzim
Pro Scripter
Posts: 89
Joined: Wed Sep 13, 2006 10:57 am

Manage to solve

Post by mfauzim » Thu Sep 14, 2006 9:13 am

I manage to solve , i miss one place where there is space in the subroutine. It is a hard habit to break from my fox programming style
regards

mfauzim
Pro Scripter
Posts: 89
Joined: Wed Sep 13, 2006 10:57 am

Thanks to all the effort.

Post by mfauzim » Thu Sep 14, 2006 9:16 am

Very appreciate of all the help I get here.

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