Odd Var Errors with script - Need Help

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Garlic_Butter
Newbie
Posts: 3
Joined: Tue Dec 12, 2006 5:15 pm

Odd Var Errors with script - Need Help

Post by Garlic_Butter » Thu Dec 14, 2006 8:08 pm

Working in MS v.8.1e - Eval Demo

Error: F Not Appropriate
With this script snippet:

Code: Select all

		VBEval>ExtractTag3("FORM",0,0),formname1
		VBEval>ExtractTag("INPUT",7,1),thetext1
		VBEval>ExtractTag2("INPUT",7,1),thename1
		VBEval>ExtractTag("INPUT",8,1),thetext2
		VBEval>ExtractTag2("INPUT",8,1),thename2
		If>%thetext1%=page.
			Let>FrameName={""}
			Let>FieldValue={"page"}
			Let>FieldName={"%thename1%"}
			Let>FormName={"%formname1%"}
		Else
			Let>FrameName={""}
			Let>FieldValue={"page"}
			Let>FieldName={"%thename2%"}
			Let>FormName={"%formname1%"}
		Endif
		LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

The 'F' is referring to the FieldName 'thename' 1 or 2 variables. The FieldName is an F with a few numbers after it, i.e. F4567.

If I switch FieldName and FormName variables around, I get the error: f Not Appropriate. The 'f' is referring to the FormName 'formname1' variables. The FormName is an f with a few numbers after it, i.e. f23.

If I remove the brackets and/or quotations, I get an Access Violation error.

From what I see through debug, the only errors I have are those 2.

Am I referring to the vars right? Is there a special way to refer to a string with letters and numbers, i.e. F4567, f234?

Here is a snippet from my log file:

12/13/2006 21:43:36:828 - START: If>Hide Help=page.
12/13/2006 21:43:36:828 - END: Else
12/13/2006 21:43:36:828 - START: Let>FrameName={""}
12/13/2006 21:43:36:828 - END: Let>FrameName={""}
12/13/2006 21:43:36:828 - START: Let>FieldValue={"page"}
12/13/2006 21:43:36:828 - END: Let>FieldValue={"page"}
12/13/2006 21:43:36:828 - START: Let>FieldName={F88}
12/13/2006 21:43:36:828 - END: Let>FieldName={F88}
12/13/2006 21:43:36:828 - START: Let>FormName={f4}
12/13/2006 21:43:36:828 - END: Let>FormName={f4}
12/13/2006 21:43:36:828 - START: Endif
12/13/2006 21:43:36:828 - END: Endif
12/13/2006 21:43:36:828 - START: LibFunc>hIE,FormFill,r,%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

It does an Access Violation with the above.

Please help. Thanks in advance.

GB
GB

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 » Thu Dec 14, 2006 8:52 pm

A quick look results in these untested comments.

Delete the trailing period:
If>%thetext1%=page.

=========================
Also, may possibly need to remove { } and/or " " around variables with Let> command. Have not looked at full usage.

From:
Let>FrameName={""}
Let>FieldValue={"page"}
Let>FieldName={"%thename1%"}
Let>FormName={"%formname1%"}
Else
Let>FrameName={""}
Let>FieldValue={"page"}
Let>FieldName={"%thename2%"}
Let>FormName={"%formname1%"}
Endif

To:
Let>FrameName=
Let>FieldValue=%page%
Let>FieldName=%thename1%
Let>FormName=%formname1%
Else
Let>FrameName=
Let>FieldValue=%page%
Let>FieldName=%thename2%
Let>FormName=%formname1%
Endif

============================
I find it is usually only necessary to have the log show the commands BEFORE running the command, instead of both before and after, which is the default.
Last edited by Bob Hansen on Thu Dec 14, 2006 9:56 pm, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Garlic_Butter
Newbie
Posts: 3
Joined: Tue Dec 12, 2006 5:15 pm

Post by Garlic_Butter » Thu Dec 14, 2006 9:11 pm

The trailing period needs to be there on that "page.".

On all the examples of the Let>s before the LibFunc cmd, they have the items in quotes. Why is that?

GB
GB

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