Jump to content
Macro Express Forums

iceman

Members
  • Posts

    51
  • Joined

  • Last visited

Posts posted by iceman

  1. You may want to consider calculating the button position by using percentages. Get the screen and application height/width of the most popular resolution. Then get the button XY position and divide those numbers by the window height and width. For example, the window is 400 pixels tall, the button is 300 pixels down. Then use a calculated Y coordinate for all the screen resolutions. Y = Window height * 3 and then Y = Y / 4. (Kind of cryptic, but I hope you get the idea.)

    iceman

  2. Can individual variables be restored (e.g. from the registry via Read Registry String), instead of all (e.g. Variable Restore Text Variables), after they have been Saved (e.g. Variable Save Text Variables)?

    Where are the variables stored when Saved (e.g. Variable Save Text Variables)?

    I could not find sample text in the Registry or in the contents of any file on my hard drive. Here's the code I used in the attempt.

    <TVAR2:01:01:WhereAreYouInHere><VARSR:01><VARSR:06>

    This question comes in response to my post the other day (Passing text variable with forward slash via Command Line Parameters). My workaround uses T98, T99, and N99 to accomplish the goal. I have a scenario where I want to use the value in T98, but I end up overriding it trying to retain the forward slashes in the other variables. Today, I worked on modifying my workaround by adding saving and restoring T98, T99 via the clipboard.

  3. The code command used was /VT1:500000/5000.

    I am planning to do a manually workaround by replacing the forward slash (e.g. /VT1:500000[Chr47]5000) with a custom string of text (e.g. [Chr47]) and then replace the custom string with a forward slash (i.e. /) after Restoring Values.

    <VARSR:05><TMVAR2:21:01:01:000:000:[Chr47]/>

    To replace most of the forward slashes, here's a macro that loops through the first 97 text variables and replaces them.

    Note: I used ASCII47 in this sample code instead of [Chr47].

    The following code is also attached as a playable macro that you may import.

    <REM2:RestoreTextVariablesReplaceForwardSlash><REM2:Converts custom text to forward slash in all variables except T98 and T99.><REM2:Uses T98, T99, and N99.><VARSR:06><REM2:T99 - Master String><TVAR2:99:01:><REM2:N99 - Variable counter><REP3:01:000001:000001:00097:1:99:><TMVAR2:07:99:00:000:000:<TMVAR2:21:><IFVAR2:2:99:3:10><REM2:Add leading zero.><TMVAR2:07:99:00:000:000:0><ENDIF><REM2:Replace ASCII47 with forward slash for text variable N99.><TMVAR2:07:99:00:000:000:%N99%:01:000:000:ASCII47ASCII01/ASCII01>><ENDREP><REM2:Replace ASCII Characters.><ASCIIC:98:1:01><TMVAR2:21:99:01:000:000:ASCII01%T98%><REM2:Run scripted macro to replace forward slashes.><RUNMACVAR:99>

    RestoreTextVariablesReplaceForwardSlash.zip

  4. We've used PaperPort a lot over the years.

    Visioneer Click Products, 3rd Party Software.

    There was a feature that you could use to align by clicking on one portion of the document, drag and release or click again. It may also auto rotate.

    Here's some code I threw together to execute such a feature.

    Prompt the user for the number of times to rotate clockwise and rotate it.

     

    <REM2:Prompt user:  Rotate clockwise how many times?><IVAR2:01:02:FRotate clockwise how many times?TTCenter:Center><REM2:Execute rotation N1 times.><REP3:05:000001:000001:0001:0:01:><REM2:Keyboard Shortcut><CTRLD><TEXTTYPE:r><CTRLU><REM2:OR><REM2:Click button.><MMW2:100,100><LCLK><REM2:Delay between rotations.><MSD:0300><ENDREP><REM2:Execute alignment feature.><REM2:Keyboard Shortcut><CTRLD><TEXTTYPE:i><CTRLU><REM2:OR><REM2:Click button.><MMW2:150,100><LCLK><REM2:Delay.><MSD:0300><REM2:Go near beginning of title.><MMW2:250,250><REM2:Click button down.><LDN><REM2:Go near end of title.><MMW2:450,250><REM2:User to click and release left button up.>

        // Prompt user:  Rotate clockwise how many times?

        Variable Set Integer %N1% from Prompt

        // Execute rotation N1 times.

        Repeat with Variable using %N1%

          // Keyboard Shortcut

          Control Key Down

          Text Type: r

          Control Key Up

          // OR

          // Click button.

          Mouse Move Window 100, 100

          Mouse Left Button Click

          // Delay between rotations.

          Delay 300 Milliseconds

        Repeat End

        // Execute alignment feature.

        // Keyboard Shortcut

        Control Key Down

          Text Type: i

        Control Key Up

        // OR

        // Click button.

        Mouse Move Window 150, 100

        Mouse Left Button Click

        // Delay.

        Delay 300 Milliseconds

        // Go near beginning of title.

        Mouse Move Window 250, 250

        // Click button down.

        Mouse Left Button Down

          // Go near end of title.

          Mouse Move Window 450, 250

          // User to click and release left button up.

    iceman

  5. I believe the problem with the code you tried is because the input box seems to be in Firefox. The suggestion I gave before works well with stable windows GUIs, not web browsers.

     

    Being that your source and destination windows are Firefox, I would suggest using the Tab key to get to your in and out fields.

     

    Maybe go to some known set position on the webpage/window via the keyboard (e.g. Alt+D takes the cursor to the Address field of Firefox). Then use tab however many times to get to the fields.

     

    I understand you don't want to move the mouse, but you could save the mouse's current position,

    <MOUSEPOS:T:01:02>

    , move the mouse to a generic spot above the text box (You may want to go to the top of the page Ctrl+Home, click near the upper left hand corner of the page/window), press tab however many times to get to the field. (You may not have to Ctrl+A if the text is already selected.) And repeat on the destination window/page. Then restore the mouse to where you had before starting the macro

    <MMS2:1N,1N>

    , or some other desirable position.

     

    Hope it helps. :)

     

    iceman

  6. Copy and paste this code in a macro and modify with your source and destination boxes.

     

    <ACTIVATE2:Notepad><GETCONTROL2P:01:NOTEPAD.EXE:NotepadNotepad001:1Edit><VARGETCONT:1:1><ACTIVATE2:UltraEdit-32><DIS:<GETCONTROL2P:02:UEDIT32.EXE:Afx:400000:8:10011:0:bc066bUltraEdit-32004:1MDIClient1Afx:400000:b:10011:6:13007e71AfxMDIFrame42s4EditControl><DIS:<VARSETCONT:2:%T1%><TEXTTYPE:%T1%>

    Get your source and destination windows running.

    Start a new macro.

    Click Get Control command from Window Controls section of Scripting Editor.

    Check Hide Macro Express.

    Click Launch Get Control Utility.

    Place your mouse over the crosshairs.

    Click and drag to your source text box.

    Release mouse.

    Click Save.

    Click OK.

    Repeat prior for destination text box, but select C2 for destination box before doing the crosshairs part. You can then use the typing of %T1% or the Variable Set Control Text command.

  7. Which key?

    Could you "grab" the text you are typing and then type it out later?

    Use Variable Set String %T1% from Prompt, analyze the characters in the variable (e.g. If Variable %T1% contains), and execute different code (e.g type %T1%, replace text or whatever)? :huh:

    Variable Set to ASCII Value is very helpful for non-alphas.

    <ASCIIV:1:0:1>

    iceman

  8. Are you using the Get Control command? It seems like you are based on your post. If not, try Get Control command. I often use Launch Get Control Utility to set my destination and manually override Top Level Window Caption with a text variable (e.g. %T91%).

    iceman

  9. Pat,

    Here's a bit of code I use to click on the second tab of a tab bar.

    // Click tab 2 (120,10).

    Mouse Single Left Click on Control %C93%

    <REM2:Click tab 2 (120,10).><CCLICK:T:93:0:F:000120,000010><

    The second tab is roughly 120 pixels from the far LEFT (X coordinate) and I chose 10 pixels down (Y coordinate) from the top of the tab control to "hit" the middle of the tab." Be sure to check Relative to Control in the Movement section of command Mouse Move.

    Hope it helps. :)

    iceman

  10. Is there a way to determine the speeds (i.e. Macro, Keystroke, and Mouse Speed) a macro is running at? :huh:

     

    Based on the content of this Topic, I chose to post my question here. :unsure:

     

    I have macros I'd like change speeds for temporarily, and then restore to the prior speeds.

     

    I looked through the various Variable Set commands (i.e. Variable Set String, Integer, Decimal, and From Misc) and could not find an option to "Set Value from " any of the speeds listed above. (Request a Feature?)

    I also didn't find any changes to the registry after changing speeds.

     

    My guess is the answer is no, and I'll end up using one of the previously suggested solutions. :D

    save ... in files or the registry

    I could also hold the values in other variables (e.g. Copy D99 to D98, and then back to reset). Following is my "speed" changer:

    <REM2:SpeedSet-MacD99-KeyN99><REM2:Set program speed.><IFVAR2:3:99:1:0><DVAR2:99:01:1><ENDIF><SPEED:%D99%><REM2:Set keyboard speed.><SPKEY:%N99%>

    I agree with Brad:

    Wow. You're a ... genius Kevin.

    The following will prove invaluable: :D

    When your macro has typed a lot of text it is a good idea to use the Wait for Text and/or Wait for Text Playback commands. This will cause the macro to wait until the text has been recognized by the application.

    Thanks.

    iceman

  11. Have you investigated/tried "Run Macro in Variable"?

    I wrote the following that demonstrates it:

    <REM2:This script is limited to a loop of 97.><IVAR2:99:02:FNumber of times to loop?
    Note:  No more than 97.FFCenter:Center><IFVAR2:2:99:4:97><TBOX4:T:1:CenterCenter000278000200:000:LimitationThis program has a limit of 97, and will now abort.  Please try again with a lower number.><MSTOP><ENDIF><REM2:N98 - Counter><REP3:05:000001:000001:0099:1:98:><REM2:N99 - Temporary prompting variable to be saved in another (e.g. N1).><REM2:Set your default value that you want the user to see when prompted each time.><REM2:  or REM or delete if you want them to see prior entry.><IVAR2:99:01:0><IVAR2:99:01:1><REM2:Prompt><IVAR2:99:02:FNext input value?TTCenter:Center><REM2:Save prompted value in another variable.><REM2:Copy N99 - Temporary prompting variable to next (e.g. N%N98%) using the counter.><REM2:Sample code to put in Run Macro in Variable.><REM2:You can use any code and put it in a text variable.><REM2:I usually put my commands and then copy them and past inside the set string field.><DIS:<NMVAR:07:99:0:0000001:0:0000000><DIS:<TVAR2:99:01:<NMVAR:07:99:0:0000001:0:0000000>><REM2:T99 - Code to run in macro.><TVAR2:99:01:<NMVAR:07:99:0:000000%N98%:0:0000000>><REM2:Run it.><RUNMACVAR:99><REM2:Do whatever else that needs to be done ...><ENDREP><REM2:TEST RESULTS><TBOX4:T:1:CenterCenter000278000200:000:TestN1	%N1%
    N2	%N2%
    N3	%N3%>

     

    Copy and paste in a new macro and try it with looping 3 times and see the Test Results. Hope it works out for you. :rolleyes: Please reply whether it works for you or not.

     

    iceman

  12. What do you mean by

    when I run Macro Express ...
    ? Starting MacExp.exe? Executing a macro?

     

    I cannot test any other Macro because the "green" run button cannot be used because another macro is running/firing every 5 seconds.

    How are running your macro that runs/fires every 5 seconds?

    ME's Scheduler?

    Repeat loop within one script that has a Delay of 5 seconds?

    If yes to the prior, consider removing the Repeat Loop and 5 second delay, and using ME's Scheduler to run your macro every 5 seconds. If you have questions regarding how to use the Scheduler, look up Schedule in the Help Index, and then Schedule Macro to Run at Miscellaneous Times. If you only want that particular macro to run every five seconds for a certain amount of time, make two more scheduled macros, one to enable and another to disable your "DoThisEvery5Secs" macro. I attached a zipped macro to demonstrate the prior suggestion.

     

    Please consider zipping and posting your mex file.

     

    Please reply if this answers your questions and maybe solves your problems, which I hope it does. :)

     

    iceman

    Forum.zip

  13. igwanna,

    Make sure Cap Locks is off.

    Try Ctrl+Alt+Shift+w.

    Press and hold Ctrl.

    Press and hold Alt.

    Press and hold Shift.

    Press w.

    Release all.

    If you get the License Info window, it has been in my experience that I'm trying to edit a macro without MacEdit.exe. Definitely click Cancel to "continue with the 30 day trial period", because the License Code is a fancy code that you get from Insight after purchase.

     

    Do you have a MacEdit.exe file where the program was installed (e.g. "C:\Program Files\Macro Express"), which is the editor? If not, that's why you cannot edit. Try the Wizard install with Default.

     

    Do you have a macex.mex file in your My Documents (e.g. "My Documents\macex.mex")? If not, that may be a clue too.

     

    What type of installation did you do (e.g. Wizard-Default, Wizard-Custom, Automated)?

     

    iceman

×
×
  • Create New...