Jump to content
Macro Express Forums

Possible Macro?


xodusx

Recommended Posts

hey, this is my first post here and wanted to ask a question. I have been using Macro express for around 3 months and its great! My question is, Is it possible to create a macro that highlights a number and adds a certain amount to it? Lets say i type in 333 in notepad, can i make a macro that would highlight it (double click it) and then add 100 to it for example. The only part i dont know about is the adding a set number to the already existing one.

 

Thanks in advance

Link to comment
Share on other sites

I looked into that, but i dont understand how it will actually get the number thats on notepad. What i have it doing so far is moving the mouse and highlighting the number then i inserted the %N2%=%N1%+100 then convert %N2% to text string %T1%, followed by Text Type %T1%. So what it does is it highlights the number and changes it to 100 since it assumes the value of N1 is 0. How do i make N1 be the number on notepad? Sorry im not that good at this :/

 

Thanks for the first reply

Link to comment
Share on other sites

Copy and past this into your scripting editor.

<CLIPC><IVAR2:01:11:><NMVAR:01:01:1:0000001:2:0000100><TEXTTYPE:%N1%>

 

It should look like:

Clipboard Copy
Variable Set Integer %N1% from Clipboard
Variable Modify Integer: %N1% = %N1% + 100
Text Type: %N1%

 

Once you highlight the text ask ME to do a ClipCopy. Then copy the clipboard contents to N1, add 100 to N1, and finally do a TextType using the 'use clipboard' option to put it back. Of course there are other ways.

Link to comment
Share on other sites

It's not the Variable Modify integer commmand that takes a long time, it's the copy from the clipboard. You should

use control commands if you want it faster. Something like:

 

<LAUNCHDEL2:2:00C:\WINDOWS\NOTEPAD.EXE><WAITWIN2:000010:000000:Untitled - Notepad><TEXTTYPE:333><GETCONTROL:01:NOTEPAD.EXE:002:NotepadUntitled - NotepadEdit333><VARGETCONT:1:1><TMVAR2:05:01:01:000:000:><NMVAR:01:01:1:0000001:2:0000100><TEXTTYPE:<CTRLD>a<CTRLU>><TEXTTYPE:%N1%>

Link to comment
Share on other sites

The default delay setting for clipboard operations is only 250ms so I doubt that's the problem. Make sure your choosing to paste the text back in with the TT instead of typing. If your typing delay is slow that could cause it. And it wouldn’t hurt to check your preferences for that clipboard delay timing. Maybe you increased it at some point.

Link to comment
Share on other sites

what i have so far is this:

<TEXTTYPE:<END>><MMS2:654,494><LDCLK><CLIPC><IVAR2:01:11:><NMVAR:01:02:1:0000001:2:0004000><TEXTTYPE:%N2%><MMS2:580,538><LDN><LUP>

 

It does what i want it to do, (this is on a site in Firefox) Goes to the bottom of the page, highlights the text in the text field, copies it, Adds the amount to it, Moves the mouse to the Submit button, and clicks it. Everything is fast except after copying the original number in the text box it takes 1-2 seconds to add the amount. Thats why i think its the modify integer value. The text is in TT so it cant be that, my typing delay is fast, but I'm not sure how to check clipboard delay timing. I can copy/paste manually fast so i don't think its that. Im not sure how to change your code Namino to work with firefox/the text box.

 

looks like this

submitxc9.png

 

thanks for all the help so far, I've learned a lot about this.

Link to comment
Share on other sites

Each time Macro Express accesses the clipboard there is a 250 millisecond delay. Your macro accesses the clipboard twice so you can expect a 1/2 second delay. I don't know why you are seeing a 1-2 second delay.

 

To change the clipboard delay click Options, Preferences and Delays. You might be able to reduce the amount of delay. However, I have only been able to reduce this to 200 milliseconds and at that setting occasional errors occur.

 

The technique I would use to determine what is happening in a macro like this is to add either Sound Beep or Sound Wave commands in the macro. Then you can 'hear' where in the macro the delay is occurring. Of course the sound commands themselves add delays. You might want to do something like this:

Sound Wave File: 0.wav
Text Type: <END>
Mouse Move Screen 654, 494
Mouse Left Button Double Click
Sound Wave File: 1.wav
Clipboard Copy
Sound Wave File: 2.wav
Variable Set Integer %N1% from Clipboard
Sound Wave File: 3.wav
Variable Modify Integer: %N2% = %N1% + 4000
Text Type: %N2%
Sound Wave File: 4.wav
Mouse Move Screen 580, 538
Mouse Left Button Down
Mouse Left Button Up
Sound Wave File: 5.wav

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...