Jump to content
Macro Express Forums

anand

Members
  • Posts

    1
  • Joined

  • Last visited

anand's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I would like to create a Macro assigned to the Up Arrow and Down Arrow keys that will read the value from the screen, convert it to a number, would increment (Up Arrow) and decrement (Down Arrow) the values by a figure of 0.05 and then write it back to the screen. To make this work I have written the following Macros - Up Arrow - // Highlight the content of the input field Text Type: <HOME><SHIFT><END> // Copy it to the clipboard Text Type: <CONTROL>c // Get the value from the clipboard into a decimal variabl Variable Set Decimal %D1% from Clipboard // Increment the number Variable Modify Decimal: %D1% = %D1% + .05 // Type out the value into the highlighted field Text Type: %D1% Alternately // Highlight the content of the input field Text Type: <HOME><SHIFT><END> // Copy it to the clipboard Clipboard Copy // Get the value from the clipboard into a decimal variable Variable Set Decimal %D1% from Clipboard // Set the value of D2 variable Variable Set Decimal %D2% to .05 // Increment the number Variable Modify Decimal: %D1% = %D1% + %D2% // Type out the value into the highlighted field Text Type: %D1% The Macro for the Down Arrow would be similar to the above except that the Variable Modify Decimal would be either Variable Modify Decimal: %D1% = %D1% - .05 or Variable Modify Decimal: %D1% = %D1% - %D2% - depending on the script used. The problem that I am facing is that this Macro isn’t a very robust and reliable one. I request other users to implement these two Macros in Macro Express and then open up a simple editor like Notepad or WordPad, type a number in it and then use these Hotkeys. You will notice that it does not consistently perform as it should. Like for example – Assume we type 25 as a number. By pressing the Up Arrow key once the number should be incremented by 0.05 to 25.05, twice to 25.1, thrice to 25.15 etc. Similarly, by pressing the Down Arrow key the number should be decremented by 0.05 to 24.95, twice to 24.9, thrice to 24.85 etc. Even though this does work it isn’t a consistent performance by the Macro. Very often other figures appear in between. Can anyone please assist by telling how I can improve on my script so that it becomes 100% functional? Thank you, Anand Mehta
×
×
  • Create New...