Jump to content
Macro Express Forums

Samrae

Members
  • Content Count

    398
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Samrae

  1. I have experience using VMWare virtual machine software but I have not used a virtual private server. (Other virtual machine software include VirtualBox, HyperV, and Parallels.) My suggestions may or may not apply to a VPS. Check for any options that may affect how macros run. Some VM's have a setting to determine how hotkeys work. For example, there may be a setting that determines whether a hotkey is sent to the host computer or to the virtual machine. Some virtual software assumes that if your keyboard and mouse are not connected that there is no reason to process keystrokes and mouse events. This is how Windows Terminal Services work. It may be that the VPS you are using works that way also. When I use a virtual machine both my computer and VMWare must be running.
  2. Windows itself only allows one dialog to receive keystrokes and mouse clicks. That window is the one that has focus or is the active window. You can have a macro that runs while you are interacting with a different window but it is tricky. First, the application where you want the macro to run must support Window Controls. Not all programs do. Then your macro needs to interact with that window with only Window Controls, not keystrokes or mouse clicks. Another approach is to create a virtual machine. When a virtual machine is running it looks and acts like a separate computer. The VM can run in a separate window on your main workstation. The VM has to be configured with Windows and your application along with Macro Express would need to be installed on the VM. It gets a bit involved but it works well.
  3. In order for a macro to run you need to do two things. First, select an activation. Second, write the macro script. Then, when the activation is performed, the script runs. From your screenshots it looks like you have created a menu macro. To activate a macro when using a menu macro you have to see the menu and you have to choose an item on the menu. Is the menu displayed? What happens when you select an item on the menu?
  4. You can include end of line character(s) when saving information to a text file. You should be able to save the end of paragraph character once you identify what that character is. The end of line character(s) differ depending on what computer system you are using. For Windows this would be CR followed by LF or CRLF. However, if your destination computer is Linux this may be LF and for Apple this may be only either CR. I will leave it to you to determine which specific character(s) you need for end of paragraph or end of line. To include these characters in your macros use the "Variable Set to ASCII Char" command. This is a sample from my macros that sets variables for CR, LF and TAB. Variable Set to ASCII Char 13 to %CR% Variable Set to ASCII Char 10 to %LF% Variable Set to ASCII Char 9 to %TAB% For more information about ASCII Characters enter "ASCII characters" into your preferred search engine.
  5. Contact support at https://www.macros.com/purchaseprotection.htm
  6. Has anyone tried to edit macros in the Direct Editor instead of the Script Editor? I haven't had the need to do this yet but it seems like one approach that may work. A Ctrl+R brings up a Find and Replace dialog in the Direct Editor. If you need more powerful editing tools you could open a macro in the Direct Editor, copy it to the clipboard, paste into a text editor, make changes, and then copy from the text editor and paste it back into the direct editor. This is not a substitute for a global Find/Replace.
  7. It is more difficult to help because you posted a screen shot instead of an actual macro. A macro can be attached to posts in this forum. Here are a couple of things that I would change: 1. If your testdat.txt file contains only one item per line I would use the Text File Begin/End Process commands instead of the ASCII File Begin/End Process commands. But, the ASCII File Begin Process should work. 2. Either of those commands put the content of the testdat.txt file into a variable. It is not necessary to include this command: Variable Set String %T1% from File: "Testdat.txt" 3. You may want to move this line just below the ASCII File Begin Process command: Variable Set %N1% to ASCII value of %T1%
  8. This is true if you highlight the macros in the Macro Explorer grid. But if you click File, Export macros a dialog comes up listing the macros that contains this option: [ ] Include the category information in the new file Have you tried this way to export macros this way?
  9. I would check your internet security software. Windows Defender was causing this exact error some time ago. At times Norton Internet Security does that today. Also, what version of Macro Express are you using? Sometimes certain issues are fixed by updating to the latest version.
  10. If interested, here is an article describing How to Run Macro Express as Administrator when Windows Starts.
  11. I second Cory's suggestion. Create a new file and import only the macros you want.
  12. The first thing to try is to run Macro Express Pro as Administrator.
  13. Terry, I'm sorry. You did use the attachment link. I don't know why it would refer to dropbox, however. Like Cory, I downloaded the file from the link and opened it in Macro Express Pro. There were no macros in the file. I then packed the file and the size was set to 60 bytes. That is the size of an empty macro file. Maybe it will work better if you copy it from the dropbox link to a folder on your hard drive and then attempt to attach it from there.
  14. Terry, Why don't you just attach the files to the forum post? I see "Drag files here to attach, or choose files..." below.
  15. Something like this may work: Set Variable %T1% to "Path to My Documents" Replace "\Documents" with "\Google Drive\Folder A\Folder B\Shared Excel Data File.csv" in %T1%
  16. Are you logged on to Windows when the macro is supposed to run? Try setting the time to 12:01 AM and see if it makes a difference.
  17. I do not know. Have you tried it? How about Macro Express? Try the "Set Window Order Always on top" command.
  18. Again, as explained in answer to your previous post the short answer is NO. Macro Express does not enter information into a program directly. Macro Express asks Windows to enter information into a program. Windows will not enter information into any program that does not have focus whether it is entering that information from the keyboard and mouse or for if it is responding to Macro Express' request to type something. There is one exception to this. Windows supports something called Window Controls. Each program must be written to support Window Controls. Many do not. This article explains more: I would like to work in one application window while a macro is running in window in the background?
  19. This will remove the name that is contained in %T[2]% from variable %[T3]%. Variable Modify String: Replace "%T[2]%" in %T[3]% with "" // Leave the "Replace Text With" box empty
  20. Here is an idea about how to tackle it. You will need two macros. Macro 1 - gets the list of files and stores them in a file. Run this only once to set up. Something like this. (You will need to change the paths): // Delete registry counter and files to set things up to process files Delete Registry Value: HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 4\$Temp\NextFileNumber // Delete the file number, if it exists Delete File/Files: "e:\FilesToProcess.txt" // Delete output file, if it exists // Get a list of the files to process Repeat with Folder e:\temp Variable Modify String: Append %File% to text file, "e:\FilesToProcess.txt" End Repeat Macro 2 - opens the next file from the list. Run each time you are finished manually processing one file. (Again, you will need to change the paths): // Use a hotkey activation for this macro // Get the NextFileNumber from the registry Variable Set Integer %NextFileNumber% to 1 // Default in case the registry value does not exist Read Registry Value "HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 4\$Temp\NextFileNumber" into %NextFileNumber% // Get number of file to use // Get the name of the next file in the list Text File Begin Process: e:\FilesToProcess.txt Break // Only get one file Text File End Process // If NextFilename is blank then all files have been processed If Variable %NextFilename% Equals "" Text Box Display: Done Macro Stop End If // Increment and save the NextFileNumber to the registry Variable Modify Integer %NextFileNumber%: Increment Write Registry Value "%NextFileNumber%" into HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 4\$Temp\NextFileNumber // Get number of file to use Variable Set From File path // Get file extension Text Box Display: Opening file If Variable %Ext% Equals ".pdf" // Process pdf files OR If Variable %Ext% Equals ".txt" // or txt files OR If Variable %Ext% Equals ".doc" // or doc files OR If Variable %Ext% Equals ".docx" // or docx files OR If Variable %Ext% Equals ".jpg" // or jpg files OR If Variable %Ext% Equals ".png" // or png files OR If Variable %Ext% Equals ".ini" // or ini files Change Directory/Folder to "e:\temp" Program Launch: "%NextFilename%" (Normal) Parameters: Else Delay: 1 seconds End If Here is code you can copy and paste for the "Get filenames" macro: <COMMENT Value="----------------------------------------------------------------------------------------------------------------------------------"/> <COMMENT Value=" Get filenames -"/> <COMMENT Value="----------------------------------------------------------------------------------------------------------------------------------"/> <COMMENT/> <COMMENT Value="Delete registry counter and files to set things up to process files"/> <DELETE REGISTRY VALUE Value="HKEY_CURRENT_USER\\Software\\Insight Software Solutions\\Macro Express 4\\$Temp\\NextFileNumber" _IGNORE="0x0025" _COMMENT="Delete the file number, if it exists"/> <DELETE FILE/FILES Path="e:\\FilesToProcess.txt" Progress="FALSE" Recurse="FALSE" Permanent="FALSE" _COMMENT="Delete output file, if it exists"/> <COMMENT/> <COMMENT Value="Get a list of the files to process"/> <REPEAT WITH FOLDER Path="e:\\temp" OnlyFiles="TRUE" Destination="%File%" FullPath="FALSE" ProcSubfolders="FALSE"/> <VARIABLE MODIFY STRING Option="\x12" Destination="%File%" Filename="e:\\FilesToProcess.txt" Strip="TRUE" NoEmbeddedVars="FALSE"/> <END REPEAT/> Here is code you can copy and past for the "Process one file" macro: <COMMENT Value="----------------------------------------------------------------------------------------------------------------------------------"/> <COMMENT Value="Process one file - "/> <COMMENT Value="----------------------------------------------------------------------------------------------------------------------------------"/> <COMMENT Value="Use a hotkey activation for this macro"/> <COMMENT/> <COMMENT Value="Get the NextFileNumber from the registry"/> <VARIABLE SET INTEGER Option="\x00" Destination="%NextFileNumber%" Value="1" _COMMENT="Default in case the registry value does not exist"/> <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\Software\\Insight Software Solutions\\Macro Express 4\\$Temp\\NextFileNumber" Destination="%NextFileNumber%" _COMMENT="Get number of file to use"/> <COMMENT/> <COMMENT Value="Get the name of the next file in the list"/> <TEXT FILE BEGIN PROCESS Filename="e:\\FilesToProcess.txt" Start_Record="%NextFileNumber%" Process_All="TRUE" Records="1" Variable="%NextFilename%"/> <BREAK _COMMENT="Only get one file"/> <TEXT FILE END PROCESS/> <COMMENT/> <COMMENT Value="If NextFilename is blank then all files have been processed"/> <IF VARIABLE Variable="%NextFilename%" Condition="\x00" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Title="Done" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n{\\colortbl ;\\red0\\green0\\blue255;}\r\n\\viewkind4\\uc1\\pard\\qc\\cf1\\f0\\fs24 All files have been processed.\\cf0\\f1\\fs20 \r\n\\par }\r\n" Left="Center" Top="Center" Width="337" Height="125" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO STOP/> <END IF/> <COMMENT/> <COMMENT Value="Increment and save the NextFileNumber to the registry"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%NextFileNumber%"/> <WRITE REGISTRY VALUE Key="HKEY_CURRENT_USER\\Software\\Insight Software Solutions\\Macro Express 4\\$Temp\\NextFileNumber" Destination="%NextFileNumber%" _COMMENT="Get number of file to use"/> <COMMENT/> <COMMENT/> <VARIABLE SET FROM FILE Filename="e:\\temp\\%NextFilename%" Option="\x01" Extension="%Ext%" Expand="FALSE" Flags="\x08" _COMMENT="Get file extension"/> <COMMENT/> <TEXT BOX DISPLAY Title="Opening file" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 Opening File %NextFilename%\r\n\\par Extension: %Ext%\\f1 \r\n\\par }\r\n" Left="Center" Top="Top" Width="574" Height="97" Monitor="0" OnTop="TRUE" Keep_Focus="FALSE" Mode="\x01" Delay="0"/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".pdf" IgnoreCase="TRUE" _COMMENT="Process pdf files"/> <OR/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".txt" IgnoreCase="TRUE" _COMMENT="or txt files"/> <OR/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".doc" IgnoreCase="TRUE" _COMMENT="or doc files"/> <OR/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".docx" IgnoreCase="TRUE" _COMMENT="or docx files"/> <OR/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".jpg" IgnoreCase="TRUE" _COMMENT="or jpg files"/> <OR/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".png" IgnoreCase="TRUE" _COMMENT="or png files"/> <OR/> <IF VARIABLE Variable="%Ext%" Condition="\x00" Value=".ini" IgnoreCase="TRUE" _COMMENT="or ini files"/> <CHANGE DIRECTORY/FOLDER Path="e:\\temp"/> <PROGRAM LAUNCH Path="%NextFilename%" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/> <ELSE/> <DELAY Flags="\x01" Time="1"/> <END IF/>
  21. When you press something like Ctrl+z it goes to the window that has focus. If Macro Express types Ctrl+z then it too goes to the window that has focus. In order to have a macro undo the delete you need to the macro set focus to File Explorer. Does the Windows Recycle Bin do what you need? If you accidentally delete something you can use the Recycle bin to recover it.
×
×
  • Create New...