Easy Problem probably

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
handsomechap
Posts: 1
Joined: Mon Dec 08, 2008 10:53 am

Easy Problem probably

Post by handsomechap » Mon Dec 08, 2008 11:03 am

Hello all I have used imacros very simply to fill in some forms for me just using the record wizard, however now I need to do something slightly more complicated and it doesn't seem to be working for me.

Basically all i want to do is a very repetitive task to check my webpages are extracting data correctly from a database, i want it to copy text from one exact position on the page then paste it into a box in another exact position, I thought I could use directscreen to do this.

I followed this guide here to try to make my own macro:
http://wiki.imacros.net/DirectScreen_Technology

I Wanted the macro to do this:
move the mouse to a certain point on screen
Hold down left mouse button
move to another point (this highlighting what i need)
release the mouse button
Do a key command to copy highlighted text (i could not find the syntax for control+C so I just guessed)
Move to new mouse position
Do a key command to paste
move to final mouse position
click mouse on submit button

This is the code i made:

Code: Select all

TAB T=1       
DS CMD=MOVETO X=642 Y=656 
WAIT SECONDS=0.01    
DS CMD=LDOWN X=642 Y=656 
WAIT SECONDS=0.01     
DS CMD=MOVETO X=866 Y=905
WAIT SECONDS=0.01 
DS CMD=LUP X=866 Y=905
WAIT SECONDS=0.01 
DS CMD=KEY CONTENT={CONTROL+C}
WAIT SECONDS=0.01 
DS CMD=MOVETO X=866 Y=919
CLICK X=866 Y=919
DS CMD=KEY CONTENT={CONTROL+V}
CLICK X=951 Y=979
But i try to perform the macro and it says: "UnsupportedCommand: command DS is not supported in the current version, line 2"
I am using version 6.1.1.0
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: Easy Problem probably

Post by mknoll1 » Mon Dec 08, 2008 4:35 pm

6.1.1.0 is not the most current version. You shoudl upgrade to the most current version.

Beyond that, you need to keep the version number line in the macro. When you record a macro a few lines are inserted automatically. They need to be in the macro. Specifically the line you are missing is:

VERSION BUILD=6221002

Your version number will be different.
justdan23
Posts: 2
Joined: Thu Apr 02, 2009 5:44 am

Re: Easy Problem probably

Post by justdan23 » Thu Apr 02, 2009 6:23 am

I'm currently using iMacros for Firefox 6.2.1.4 and I'm seeing the same problem.

The online documentation says 'WINCLICK' was replaced with 'DS' internally to use the 'DirectScreen Technology'.
However, the 'Click Mode' Options only list three options:
1. Select the best click mode automatically
2. Use complete HTM tag
3. Use X/Y position


The online documentation ( http://wiki.imacros.net/DS ) says version 6 has additional options for 'DirectScreen' and shows pictures of what dialog should show ( http://wiki.imacros.net/Image:Select_click_mode_DS.png ). However, this is not the same dialog appearing from the Firefox Add-on for version 6.2.1.4. :shock:

Q: Could the XPI contain the wrong binary files for version 6.2.1.4 for Windows?
=Dan=
Marcia, Tech Support
Posts: 1094
Joined: Thu Jan 29, 2009 1:10 pm

Re: Easy Problem probably

Post by Marcia, Tech Support » Thu Apr 02, 2009 1:43 pm

Hello,

Sorry, Dan. Just the Business Editions, and not the freeware iMacros Addon for Firefox, support Direct Screen, as you can see from this feature comparison table.
Regards,

Marcia
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: Easy Problem probably

Post by mknoll1 » Fri Apr 03, 2009 6:12 pm

I think you got sidetracked here and there is a simple answer to your initial questions which is yes.

Code: Select all

VERSION BUILD=6221002     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://www.iopus.com/imacros/demo/v6/f1/form.asp     
TAG POS=1 TYPE=STRONG ATTR=TXT:* EXTRACT=TXT  
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:TestForm ATTR=NAME:Name CONTENT={{!EXTRACT}} 
Once you extract some data from your site you have it stored in memory as a variable that you can then use later in the script with the variable {{EXTRACT}}

As a secondary point I will tell you from a lot of experience that you shoudl avoid positional clicks except as absolutely necessary. It is not anything wrong with positional clicks specifically; It is just that it is much easier to communicate to someone flip the light switch on the wall to your left than it is to say 1.6 meters from the floor and .3 meters from the doorway hold your hand a few mm from the wall and move it up 4 cm. If you are using flash or something you won't have much choice but if you can you should redo the script using more conventional methods of recording.
Post Reply