acantor
-
Posts
1,532 -
Joined
-
Last visited
-
Days Won
18
Content Type
Profiles
Forums
Events
Posts posted by acantor
-
-
My main concern with ChatGPT is that its responses may be inaccurate or wrong. Some responses may even be total fabrications.
I recently asked ChatGPT a question about a certain 18th century composer. Much of the answer makes sense and conforms to what is known about the composer.
But ChatGPT seems to have invented a musical collaboration between the composer and a religious scholar, perhaps because their surnames are similar. The likelihood of a collaboration between the two is slim -- the composer was 46 years older.
-
I downloaded the application and took it for a test ride, both with and without Macro Express.
It's an extremely inaccessible program. Macro Express is unable to interact with the user interface in any meaningful way. An application-specific script for Anyviewer isn't even possible. From a macro-scripter's perspective, Anyviewer is useless.
I uninstalled it!
Find a different application if you're wanting to automate tasks via Macro Express.
-
My code is illustrative. You'll need to modify several lines before the script might work.
I have no way of knowing the path to the executable on your computer. And I don't even know the name of the executable. So I invented the path and the program name. This line is probably totally wrong!
c:\Programs\Anyviewer.exe
-
It looks like the "AeroAdmin v4.9" window is not receiving keyboard input focus when it opens. Your script may need to give it focus before the script does anything else. Maybe something like this:
// Launch Anyviewer... Program Launch: "c:\Programs\Anyviewer.exe" (Normal) // Wait up to five seconds for the "AeroAdmin" window to open Repeat Start (Repeat 10 times) If Window "AeroAdmin v" is running // Parital match of window that isn't gaining focus Window Activate: AeroAdmin v // Give focus to the window Repeat Exit Else Delay: 500 milliseconds End If End Repeat // Act on the now-focused AeroAdmin window... Text Type (Simulate Keystrokes): <TAB>12345<TAB>abcde<ENTER>
-
No problem using one macro to collect the data, and a second macro to output the results.
The key is to end the data collection macro with this:
Variable Save: Save Text Variables
And to start the macro that outputs the data with this:
Variable Restore: Restore Text Variables
You can more-or-less divide my code into two. You may need to modify the number of tabs in the macro that spits out the answers.
In the data collection macro, you will be prompted to enter the name, phone number, etc. Each value is stored in a variable, e.g., %FirstName% and %PhoneNumber%.
In the data output macro, you navigate from field to field by simulating Tab presses. Here's how to output three Tabs...
Text Type (Simulate Keystrokes): <TAB><TAB><TAB>
When you reach the field you want, output the variable that goes in that field:
Text Type (Simulate Keystrokes): %FirstName%
I'm not sure what you're referring to by "VARIABLE SET COMMANDS PROMPT." For this project, you need the "Variable Set String" instruction:
Variable Set String %FirstName%: Prompt
-
I think you're on the right track. Maybe something like this?
// (Optional) Restore the values of the variables from the previous run Variable Restore: Restore Text Variables // Collect data... Variable Set String %FirstName%: Prompt Variable Set String %LastName%: Prompt Variable Set String %PhoneNumber%: Prompt // etcetera // Output data... Text Type (Simulate Keystrokes): %FirstName% Text Type (Simulate Keystrokes): <TAB> Text Type (Simulate Keystrokes): %LastName% Text Type (Simulate Keystrokes): <TAB> Text Type (Simulate Keystrokes): %PhoneNumber% Text Type (Simulate Keystrokes): <TAB> // etcetera // (Optional) Save the values of the variables for use next time Variable Save: Save Text Variables
-
Try adding a short delay after the copy instruction.
If the content of the cell is not getting copied, try the following. F2 puts a cell in edit mode. The method WON'T work if the cell contains a formula. The formula will get copied, not the value.
Text Type (Simulate Keystrokes): <F2> Delay: 100 milliseconds Text Type (Simulate Keystrokes): <CONTROL>a Delay: 100 milliseconds Text Type (Simulate Keystrokes): <CONTROL>c Delay: 100 milliseconds Text Type (Simulate Keystrokes): <ESC>
-
Yes, you can start at the beginning...
:Start Repeat Start (Repeat 10 times) Mouse Move: 100, 200 Relative to Screen Get Pixel Color from Beneath the Mouse into %Pixel% If Variable %Pixel% Equals "123456" // Success. Do something and then stop Macro Stop Else Delay: 1000 milliseconds End If End Repeat // The colour was not found after ten seconds. Try again! Goto:Start
...but this kind of script can lead to a lot of mischief. I think it's better to have a fail-safe... If the colour is not found after a certain amount of time, the macro should simply stop. Otherwise, you risk an infinite loop.
-
Repeat Start (Repeat 10 times) Mouse Move: 100, 200 Relative to Screen Get Pixel Color from Beneath the Mouse into %Pixel% If Variable %Pixel% Equals "123456" // Success. Do something. Repeat Exit Else Delay: 1000 milliseconds End If End Repeat
-
I suggest submitting a feature request. The folks at Insight Software have always been responsive to requests for Macro Express enhancements and to reports of bugs. They don't (or can't) do everything asked for, but there are features in the program today that began as requests from users.
-
Earlier in this thread, I shared my "best" macro of 2022, which holds down the mouse button for five seconds and then releases it.
This afternoon I've been experimenting with ChatGPT. It's surprisingly good. Much better than I expected.
In a moment of levity, or perhaps of optimism, I asked ChatGPT a question about Macro Express:
QuoteWrite a Macro Express script to temporarily hold down the left mouse button
QuoteHere's a simple macro script in Macro Express that will temporarily hold down the left mouse button:
-
Open Macro Express and create a new macro.
-
In the "Keyboard/Mouse Action" section, select "Press and Hold Mouse Button."
-
In the "Button" section, select "Left."
-
In the "Duration" section, specify how long you want the left mouse button to be held down.
-
Add another action, "Release Mouse Button."
-
In the "Button" section, select "Left."
-
Save the macro and assign a keyboard shortcut or set it to activate on a schedule or specific window.
This script will cause the left mouse button to be held down for the specified duration and then released. You can adjust the duration as needed
ChatGPT's database mostly contains information gleaned from the web prior to 2021, so this inaccurate but plausible-sounding answer wasn't pulled from this thread. -
-
Good to know. I've never run Macro Express as Administrator.
-
On some computers, I have no problem using Macro Express to "expropriate" F1 for my own purposes. On other computers, especially in corporate environments, key combinations that include F1 are not recognized when remapped, e.g., Shift + Alt + F1 and Ctrl + Alt + F1. It's as though certain applications "see" the key combinations before Macro Express does.
I'm not sure whether this relates to the version of Macro Express. I have remapped F1 on my up-to-date version of MEP running Windows 10, but I hit walls when using the 18-month old version of MEP that my corporate client uses, also running Windows 10. My guess it's less about the MEP version than about the way my client configures their computers.
-
-
I don't see an obvious reason why a hotkey macro won't respond in the "Disk Management" window.
Try recreating the macro from scratch, paying extra attention to its scope. Experiment with window specific and application specific, partial / exact matches, and hidden / non-hidden windows.For testing purposes, set the scope to Global.
Try totally different hotkeys. I recently stumbled on a bunch of key combos I couldn't assign because a background application "saw" the hotkeys before Macro Express did. (In this case, the affected hotkeys included F1, e.g., Ctrl + Alt + F1.)
-
Firefox has a search-links-only feature which I've used instead of Ctrl + F to reduce search volume.
The feature is helpful in another situation: If a string appears many times on a page, but only once as part of a hypertext link, search-links ensures the script zeros in on the link.
The hotkey for search-links in Firefox is the open single quote character. That's a problem. If focus is in an editable field, the hotkey fails; instead the hotkey inserts the single quote character. (Maybe there's a way to change the hotkey to Ctrl + something, which would allow feature to work in more contexts.)
Strangely, the feature appears to be absent in Chrome and Edge.
-
I've built scripts that search for text adjacent to a field I want to focus. Then the script tabs or (Shift+Tab) to the target. In pseudo code....
Type "Control+F" // Find on the page. In some applications, you can use F3.
Wait a split second
Type "City:" // Unique text near the field I want to get to
Type "{Enter}" // Initiate the search
Type "{Esc}" // Cancel the search
Wait a split second
Type "{Tab}{Tab}" // Navigate to the field i want to reach
This approach is fussy. It takes trial and error to get the timing right, and to work out what text to search for. But with effort, I can usually get it to work almost 100% of the time.
-
I would find it be helpful to see the code you've tried, and to look at some of the actual data.
When you say, "I'd like to be able to do something different every time %T[1]% changes", I think you're saying you want to compare the value of %T[1]% against the value obtained the last time you triggered the macro. If that's the case, make sure your macro begins with "Variable Restore" and ends with "Variable Save."
-
Today I learned that in Microsoft Word, Alt + Numpad 5 is the hotkey to select a table.
With this new factoid in mind, I began to write a Macro Express script to do something with it. The script runs through a multi-step process that selects an entire table, copies it, assigns the data to a variable, parses the data, etc.
The problem is that my script, which starts with this line...
Text Type (Simulate Keystrokes): <ALT><KEYP5>
... doesn't select the table. Instead, the script inserts an emoji for the club, as in the suit in a pack of playing cards: ♣I tried different hotkey activations for my macro, including "Alt + /" and "Ctrl + /" but the result was the same.
I tried <ALTD><KEYP5><ALTU>. Same thing.
Any ideas on why I'm getting an emoji instead of a key press?
-
Maybe something like this? I opted for hotkey activation, and chose LMouse as the hotkey.
Lock Keyboard and Mouse Wait for Left Mouse Click // One click On Error Catch Error: Condition was not met within the specified amount of time Text Box Display: One click Macro Stop End Catch Error End Error Text Box Display: Two clicks Unlock Keyboard and Mouse
A script like this needs to be window or program specific. Otherwise, left clicking anywhere, and in any context, will trigger the macro. Which you probably don't want to happen!
-
Message added by mistake
-
Very nice, rberq! I'd be curious to learn how your macro detects the second key press.
Once upon a time, I wrote a macro activated by Esc. If I pressed Esc once, the macro outputted Esc. If I pressed it twice, the macro outputted Esc twice. But if I was impatient and quickly pressed Esc three times, the macro closed the current window.
I eventually gave up on this macro. Initially it was fun to watch a window close by being persistent with Esc. But after a few days, I tired of the delay when pressing Esc once, as the macro doesn't send keystrokes until the last line of the script.(I press Esc dozens or hundreds of times a day, so I found the delay too noticeable.)
But your idea of only waiting for a second key press might be the solution that eluded me. Simplicity trumps cleverness!
-
This simple macro that I developed last summer hasn't made my life any easier, but it's simplifying someone else's. It's a way to drag the mouse using the absolute minimum amount of physical effort: no clicks, no holding down mouse buttons. All he has to do is point to the starting location, point to the end location, and the macro does the heavy lifting.
Due to a congenital condition, this guy has limited hand strength. Holding down mouse buttons becomes very tiring very fast. But some tasks he performs MUST be done by dragging. There's no keyboard equivalent.
Here's how the macro works:
1. He hovers the mouse pointer over the location the drag will start. (No need to click.)
2. He triggers the macro.
3. The macro waits five seconds while he moves the pointer to the target location. (Again, no need to click.) We started with a two second wait, but found it wasn't always enough time.
If he's selecting text: the words between the start and target location get selected.
If he's dragging an object: the object moves from the start location to the target location.
Here's the script:
Mouse Left Button Down Delay: 5000 milliseconds Mouse Left Button Up
- 1
-
During the past year, has there been a Macro Express script that has made your life a little easier?
Anyone Tried Writing Macros with ChatGPT?
in Macro Express and Macro Express Pro
Posted
🤣