Problem with VBMacroCreator

Share your tips, tricks and favorite iMacros macros, scripts and applications for web automation in general here.

Moderator: iMacros Moderators

Problem with VBMacroCreator

by LAPIII on Sun May 24, 2009 8:10 am

[Admin: Split from other post]

Every time th I dwnloaanopen it, I get this:
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by LAPIII on Sun May 24, 2009 8:29 am

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
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by LAPIII on Sun May 24, 2009 8:33 am

Now when opening with IE7 I geta flickering screen which forces me to Log off as a user!
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by Hannes, Tech Support on Sun May 24, 2009 12:37 pm

So you could not download/save the ZIP file, or you did not know what to do after downloading the ZIP?
Hannes, iOpus Support
Hannes, Tech Support
 
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am

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

by LAPIII on Sun May 24, 2009 1:26 pm

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.
Attachments
Instant Macro.jpg
Instant Macro.jpg (103.28 KIB) Viewed 9247 times
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by LAPIII on Sun May 24, 2009 1:27 pm

How do I copy code into this?
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by Hannes, Tech Support on Sun May 24, 2009 11:42 pm

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.
Hannes, iOpus Support
Hannes, Tech Support
 
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am

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

by LAPIII on Wed May 27, 2009 8:11 am

Is the result a complete VB script or just some code?
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by Hannes, Tech Support on Wed May 27, 2009 8:43 am

Do you have problems testing it?
Hannes, iOpus Support
Hannes, Tech Support
 
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am

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

by LAPIII on Wed May 27, 2009 8:46 am

Ifo meant the outpt of the VD generato, I don't kow how to test it.
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by LAPIII on Thu May 28, 2009 6:38 am

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.
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

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

by LAPIII on Fri May 29, 2009 12:35 pm

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/automatic-data-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/stopwatch-report.htm
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:path CONTENT=C:\demo-stopwatch.csv
LAPIII
 
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

Re: Problem with VBMacroCreator

by Hannes, Tech Support on Sat May 30, 2009 3:21 am

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
Hannes, iOpus Support
Hannes, Tech Support
 
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am


Return to How-To's and useful iMacros: All other topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron
-->