Page 1 of 1

Problem with VBMacroCreator

Posted: Sun May 24, 2009 3:10 pm
by LAPIII
[Admin: Split from other post]

Every time th I dwnloaanopen it, I get this:

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Sun May 24, 2009 3:29 pm
by LAPIII
Thesere things of tried before opening the file (where I still get tat error):

I tried downloading via Firefox 3..0.10 and IE7

I changed the default browser at Control Pael > Programs > Default Programs > Set your default program

I changed the browser that would open HTML and HTM files at Control Pael > Programs > Default Programs > Associate a file type or protocol with a program

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Sun May 24, 2009 3:33 pm
by LAPIII
Now when opening with IE7 I geta flickering screen which forces me to Log off as a user!

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Sun May 24, 2009 7:37 pm
by Hannes, Tech Support
So you could not download/save the ZIP file, or you did not know what to do after downloading the ZIP?

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Sun May 24, 2009 8:26 pm
by LAPIII
The attachment that you sent me worked as soon as I extracted the file using 7-Zip! By the way, it worked like the downoad from http://www.file-upload.net/download-1104462/VBM except that I didn't have to extract anything.

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Sun May 24, 2009 8:27 pm
by LAPIII
How do I copy code into this?

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Mon May 25, 2009 6:42 am
by Hannes, Tech Support
LAPIII wrote:How do I copy code into this?
The "workflow" is as follows: open your macro in an editor (http://wiki.imacros.net/First_Steps#Edit_Macros), copy its code and paste it into the box below "cut and paste your macro here". Then click the "Make VB Code" button.

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Wed May 27, 2009 3:11 pm
by LAPIII
Is the result a complete VB script or just some code?

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Wed May 27, 2009 3:43 pm
by Hannes, Tech Support
Do you have problems testing it?

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Wed May 27, 2009 3:46 pm
by LAPIII
Ifo meant the outpt of the VD generato, I don't kow how to test it.

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Thu May 28, 2009 1:38 pm
by LAPIII
Excuse me, mispellings in my last post . I meant it to read: If you meant the outpt of the VB generator, I don't kow how to test it.

Re: Embedding in VB is a must, Here's an app to create code...

Posted: Fri May 29, 2009 7:35 pm
by LAPIII
I never completely read what it says in VB Macro. After I copied Stopwatch.iim into VB Macro, I read:

Then to create a basic application Put this code in an action such as click a form:

Dim iim1, iret
Set iim1 = CreateObject("InternetMacros.iim")
iret = iim1.iimInit
iret = iim1.iimPlay( TempMacro )

If iret < 0 Then
Msgbox iim1.GetLastError()
End If

iret = iim1.iimExit



So, wouldn't that mean the full script would be the code above plus Stopwatch.iim? Like this:

Dim iim1, iret
Set iim1 = CreateObject("InternetMacros.iim")
iret = iim1.iimInit
iret = iim1.iimPlay( TempMacro )

If iret < 0 Then
Msgbox iim1.GetLastError()
End If

iret = iim1.iimExit
VERSION BUILD=603804
TAB T=1
TAB CLOSEALLOTHERS
'Change the default stopwatch file name:
'The file is saved to the Internet Macros DOWNLOAD folder
'
SET !FILESTOPWATCH C:\demo-stopwatch.csv
'Note 1: Please change this path on VISTA, as VISTA prevents writing a file to the c:\ root.
'Note 2: Use SET !FILESTOPWATCH NO if you do NOT need a response time log file (for example, if you return the values to the Scripting Interface via EXTRACT)

'
'Start reponse time measurement
'Measure total macro runtime
STOPWATCH ID=Total
'Measure load time for first page
STOPWATCH ID=Firstpage
URL GOTO=http://www.iopus.com/imacros/demo/v6/stopwatch.htm
STOPWATCH ID=Firstpage
'
'
'Add the measured response time to EXTRACT to return it to Scripting Interface. See the "get-response-time.vbs" example script for details
'If you use the log file only, you do NOT need this line
ADD !EXTRACT {{!STOPWATCHTIME}}
'
'
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/imacros/demo/v6/f2 ... -entry.asp
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:WebDataEntry ATTR=NAME:FNAME CONTENT=Tom
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:WebDataEntry ATTR=NAME:LNAME CONTENT=Tester
'Measure server reaction on submit
STOPWATCH ID=SubmitData
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:WebDataEntry ATTR=NAME:SendButton&&VALUE:Click<SP>to<SP>submit<SP>data
STOPWATCH ID=SubmitData
'Add this value to EXTRACT, to return it to Scripting Interface
ADD !EXTRACT {{!STOPWATCHTIME}}
'Measure time for secure Online store to open
'go to store
TAG POS=1 TYPE=A ATTR=TXT:Buy
'open store => start timer
TAG POS=1 TYPE=IMG ATTR=ALT:Buy<SP>Now
STOPWATCH ID=Store1
'Add this value to EXTRACT, to return it to Scripting Interface
ADD !EXTRACT {{!STOPWATCHTIME}}
'
'Measure time for second page
'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:order ATTR=NAME:heardabout CONTENT=Internet<SP>Macros<SP>Test
STOPWATCH ID=Total
'Add this value to EXTRACT, to return it to Scripting Interface
ADD !EXTRACT {{!STOPWATCHTIME}}
'
'Tell user where to find the report
'
WAIT SECONDS=2
URL GOTO=http://www.iopus.com/imacros/demo/v6/st ... report.htm
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:path CONTENT=C:\demo-stopwatch.csv

Re: Problem with VBMacroCreator

Posted: Sat May 30, 2009 10:21 am
by Hannes, Tech Support
No, you must not mix up VBS scripts with iMacros macros.

You either stay with the macro commands and play them right in iMacros.

Or you use a script, and call the macros via iimPlay(). Either via their name, or by calling a string variable that contains the macro (as the VBCodeCreator creates it). In your case:

Code: Select all

Dim iim1, iret
'note that it reads "imacros" in the following CreateObject call. "InternetMacros.iim" is deprecated
Set iim1 = CreateObject("imacros")
iret = iim1.iimInit

'create the TempMacro string that contains the macro
Dim TempMacro
TempMacro = "CODE:"
TempMacro = "URL GOTO=..." + vbNewLine
' ...
' ...
'and so on

'then call that macro via iimPlay()
iret = iim1.iimPlay( TempMacro )

If iret < 0 Then
Msgbox iim1.GetLastError()
End If

iret = iim1.iimExit