Problem with VBMacroCreator

Share your tips, tricks and favorite iMacros macros, scripts and applications for web automation in general here.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team
Post Reply
LAPIII
Posts: 254
Joined: Tue Oct 07, 2008 7:24 pm

Problem with VBMacroCreator

Post by LAPIII » Sun May 24, 2009 3:10 pm

[Admin: Split from other post]

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

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

Post by LAPIII » Sun May 24, 2009 3:29 pm

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 7:24 pm

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

Post by LAPIII » Sun May 24, 2009 3:33 pm

Now when opening with IE7 I geta flickering screen which forces me to Log off as a user!
Hannes, Tech Support

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

Post by Hannes, Tech Support » Sun May 24, 2009 7:37 pm

So you could not download/save the ZIP file, or you did not know what to do after downloading the ZIP?
LAPIII
Posts: 254
Joined: Tue Oct 07, 2008 7:24 pm

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

Post by LAPIII » Sun May 24, 2009 8: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 138525 times
LAPIII
Posts: 254
Joined: Tue Oct 07, 2008 7:24 pm

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

Post by LAPIII » Sun May 24, 2009 8:27 pm

How do I copy code into this?
Hannes, Tech Support

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

Post by Hannes, Tech Support » Mon May 25, 2009 6:42 am

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

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

Post by LAPIII » Wed May 27, 2009 3:11 pm

Is the result a complete VB script or just some code?
Hannes, Tech Support

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

Post by Hannes, Tech Support » Wed May 27, 2009 3:43 pm

Do you have problems testing it?
LAPIII
Posts: 254
Joined: Tue Oct 07, 2008 7:24 pm

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

Post by LAPIII » Wed May 27, 2009 3:46 pm

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

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

Post by LAPIII » Thu May 28, 2009 1:38 pm

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 7:24 pm

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

Post by LAPIII » Fri May 29, 2009 7: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 ... -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
Hannes, Tech Support

Re: Problem with VBMacroCreator

Post by Hannes, Tech Support » Sat May 30, 2009 10: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
Post Reply