problem pulling down variable

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
roo
Newbie
Posts: 15
Joined: Thu May 29, 2008 12:12 am
Location: Washington D.C.

problem pulling down variable

Post by roo » Fri May 30, 2008 3:38 pm

Can anyone explain to me why line 108 (Let>FieldValue={"%Model%"}) pulls the variable yet line 128 (Let>TagValue={"%Result2%"}) does not?

thanks,
-roo

:?

//PHASE 2 - PRINTER DRIVER

//printer driver
Label>Phase 2 welcome
Messagemodal>Now that we know that we can communicate with the copier, let's install the printer driver.

Label>Model
Let>INPUT_BROWSE=0
Input>Model,What model copier are we installing? %CRLF%%CRLF%Please use only the numerical portion of the model name. %CRLF%%CRLF%(For example: use 7665 for a Workcenter 7655.)
Label>exit

Label>Driver Source
Dialog>Dialog1
Caption=Dialog1
Width=428
Height=250
Top=263
Left=409
Label=There are two ways the A.N.I. can install the printer driver.,32,16,true
Label=Please select one of the following to continue.,32,40,true
Button=Download printer driver from http://www.Xerox.com,24,72,369,49,1,,You must be able to access the internet for this option.
Button=I already have the printer driver files.,24,136,369,49,3,,These files can be on a CD or hard drive
EndDialog>Dialog1

Show>Dialog1,result1
If>result1=1
Goto>Driver Type
Else
Goto>Driver is resident
Endif
Label>exit


//the following command is incomplete.................................................
Label>Driver is resident
Message>Point to it
exit>0
Label>Exit
//the above command is incomplete.....................................................

Label>Driver Type
Dialog>Dialog2
Caption=Dialog2
Width=268
Height=216
Top=289
Left=497
Label=What print driver would you like to install?,32,16,true
Button=PCL,24,48,209,41,1,,Click here if you plan on printing mainly text.
Button=PS (PostScript),24,112,209,41,3,,Click here if you plan to print a lot of graphics, photos, or color.
EndDialog>Dialog2

Show>Dialog2,Result2
If>Result2=1
Let>Result2=PCL6 Driver, Xerox User Interface - Microsoft Certified
Goto>Download driver
Else
Let>Result2=PS Driver, Xerox User Interface - Microsoft Certified
Goto>Download driver
Endif
Label>exit

//...........label below needs completion............................
Label>Download PS driver
Message>Download PS driver
exit>0
Label>Exit
//............label above needs completion...........................


//Download

Label>Download driver
// Generated by MacroScript WebRecorder 2.03
// Recorded on Thursday, May 29, 2008, at 09:22 PM

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

IE_Navigate>%IE[0]%,http://www.xerox.com/,r
IE_Wait>%IE[0]%,r
Wait>delay

IE_Wait>%IE[0]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"Support & Drivers"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r

IE_Wait>%IE[0]%,r
Wait>delay

IE_Wait>%IE[0]%,r
Wait>delay

IE_Wait>%IE[0]%,r
Wait>delay

IE_Wait>%IE[0]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={"productSearch"}
Let>FieldName={"prodSearch"}
Let>FieldValue={"%Model%"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={"productSearch"}
Let>TagValue={"http://www.support.xerox.com/_common/ex ... _en-us.gif"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,SRC,str:TagValue,r

IE_Wait>%IE[0]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={"productSearch"}
Let>TagValue={"Drivers & Downloads"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r

IE_Wait>%IE[0]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={"productSearch"}
Let>TagValue={"%Result2%"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r

IE_Wait>%IE[0]%,r
Wait>delay

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

WaitWindowOpen>File Download
SetFocus>File Download

//FILE DOWNLOAD - YOU MAY NEED TO MODIFY THIS PART
//MODIFY FILE PATH AND NAME HERE:
Let>filename=download.file
Wait>1
Send>s
WaitWindowOpen>Save As
SetFocus>Save As
Send>filename
Press Alt
Send>i
Release Alt
Send>d
Press Alt
Send>s
Release Alt
WaitWindowClosed>Save As
WaitWindowOpen>%filename%*
WaitWindowClosed>%filename%*

IE_Quit>%IE[0]%,r

Label>end_script

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

Post by Marcus Tettmar » Fri May 30, 2008 3:50 pm

In the Advanced Editor set a breakpoint just before line 128. Then hit Run. When the script stops at the breakpoint look at the watchlist to see what the value of Result2 is.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

User avatar
roo
Newbie
Posts: 15
Joined: Thu May 29, 2008 12:12 am
Location: Washington D.C.

Post by roo » Fri May 30, 2008 5:05 pm

ok...

I inserted:
MessageModal>Result2
The result was displayed as being:
PCL6 Driver, Xerox User Interface - Microsoft Certified

This matches what I am trying to have clicked but I still get an error saying:
Line: 130 P not appropriate.
This is the same error I was getting before. (Of course the number changed because I inserted more lines for the test.)

What do you think? Does the "P" in the error mean anything?

The original line captured by WebRecorder was:
Let>TagValue={"PCL6 Driver, Xerox User Interface - Microsoft Certified"}

-roo

User avatar
roo
Newbie
Posts: 15
Joined: Thu May 29, 2008 12:12 am
Location: Washington D.C.

Post by roo » Fri Jun 06, 2008 3:43 am

Just so everyone knows...

Tech support asked me to remove the { }s from the line...and it works now!

Used to be:
Let>TagValue={%Result2%}

changed to:
Let>TagValue=%Result2%

-roo

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