Jump to content
Macro Express Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by amonaghan

  1. Is the drop-down list on a web page? If so, you might be better viewing the HTML code and parsing that instead.
  2. Terry, I'm on Windows 10 Home Version 1709 build 16299.214 if it helps.
  3. Terry, I found a copy of PSP 9 lying around and the following works for me. Running man goes shortly after PSP starts up. <ACTIVATE OR LAUNCH Title="Jasc Paint Shop Pro" Exact_Match="FALSE" Wildcards="FALSE" Path="C:\\Users\\Alan\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Jasc Software\\Jasc Paint Shop Pro 9.lnk" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/> Not sure if it matters, but I used a Shortkey (PSP). Alan
  4. Terry, there have been 11 newer versions of PSP since ver 8. Maybe it is just a compatibility issue with Win10. Have you tried running it in compatibility mode?
  5. You might want to have a look at this:- https://www.pcworld.com/article/3223136/data-center-cloud/google-drive-is-being-replaced-by-backup-and-sync-what-to-expect.html
  6. Nothing wrong with your solutions Cory and I really do appreciate the help as it kick started my brain. The only difference was I needed it to take today's date automatically, rather than hard coding it or selecting it from the date picker.
  7. I got the second last variable wrong in the DG. Output should be this:-
  8. Thanks everyone for the help. It gave me a few thing to think about. I even tried using VBScript to no avail. I eventually got this to work, although it requires 3 different variable types for each date. <DATE/TIME Flags="\xB0" Date="15/05/2017 20:28:11" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%CurrentDate%" IsDateVar="TRUE"/> <CONVERT DATE/TIME TO DECIMAL Source="%CurrentDate%" Dest="%dCurrentDate%"/> <VARIABLE MODIFY DECIMAL Option="\x06" Destination="%dCurrentDate%" Variable="%nCurrentDate%"/> <DATE/TIME Flags="\x93" Date="15/05/2017 20:35:05" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Prompt="Enter Target Date" Left="Center" Top="Center" Monitor="0" Variable="%TargetDate%" IsDateVar="TRUE"/> <CONVERT DATE/TIME TO DECIMAL Source="%TargetDate%" Dest="%dTargetDate%"/> <VARIABLE MODIFY DECIMAL Option="\x06" Destination="%dTargetDate%" Variable="%nTargetDate%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%nDateDiff%" Value1="%nTargetDate%" Value2="%nCurrentDate%"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %CurrentDate%\r\n\\par %dCurrentDate%\r\n\\par %nCurrentDate%\r\n\\par %TargetDate%\r\n\\par %TargetDate%\r\n\\par %nTargetDate%\r\n\\par \r\n\\par \\f1 Diff = %nDateDiff%\\f0 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Date/Time: Set %CurrentDate% to the current date/time Convert Date/Time to Decimal: %CurrentDate% => %dCurrentDate% Variable Modify Decimal %dCurrentDate%: Truncate to Integer (%nCurrentDate%) Date/Time: Set %TargetDate% to a user prompted date/time Convert Date/Time to Decimal: %TargetDate% => %dTargetDate% Variable Modify Decimal %dTargetDate%: Truncate to Integer (%nTargetDate%) Variable Modify Integer: %nDateDiff% = %nTargetDate% - %nCurrentDate% Text Box Display: Output A bit of a sledgehammer to crack a nut really, but it seems to work.
  9. Thanks, it looks easy like that when prompting for Date only rather than current Date/Time which doesn't seem to give the option of Date only. Simple macro with displayed results below:- <DATE/TIME Flags="\xB0" Date="13/05/2017 14:00:00" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%dCurrent%" IsDateVar="TRUE" _COMMENT=" Store Current Date"/> <DATE/TIME Flags="\x93" Date="13/05/2017 16:03:21" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Prompt="Enter date of stay" Left="Center" Top="Center" Monitor="0" Variable="%dDate%" IsDateVar="TRUE" _COMMENT=" Enter Future Date"/> <VARIABLE MODIFY DATE/TIME DateVar="%dDateDiff%" Option="\x01" LeftVar="%dDate%" RightVal="%dCurrent%" UseInteger="TRUE" MathOpt="\x00" _COMMENT=" Difference = Future Date - Current Date"/> <TEXT BOX DISPLAY Title="Date Calculation" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Current Date: %dCurrent%\r\n\\par End Date: \\f1 %dDate%\r\n\\par \\f0 Difference: \\f1 %dDateDiff%\r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> As you can see, I get a decimal part which is undesirable for what I want. I need the result here to be 7 exactly. Obviously rounding won't do it here. <--- Second image not required, but I can't work out how to delete it from my post.
  10. I know this has come up before but previous posts have just confused me further. I'm looking for a simple solution to the following:- Store today's date to variable (date or other type?) Set new date in future and store to variable (date or other type?) Calculate difference between the two dates in whole days. I'm not looking for time calculations on whole number of days. This should be easy, but I'm getting very frustrated with the way the Date functions work. e.g. Today is 13/05/2017 - VarA A week from now is 20/05/17 - VarB VarB - VarA = 7 P.S. I'm a bit upset today as my football team just got relegated to the third tier of Scottish football
  11. As rberq suggests, it may be that you have set the scope to 'Word' only. Try changing it to 'Global' or better still, tell us what program you are running the macro in.
  12. Thanks Cory, I'll look into your suggestions over the weekend.
  13. I followed the instruction posted in another thread here :- https://www.macros.com/faq/1.92.html for setting Macro Express up to run as an Administrator. Now I've noticed a simple one line macro desktop shortcut doesn't work. The only line in the macro is:- Hibernate I tried sending it to a log file and it doesn't record anything. If I run the same macro from Macro Explorer, it works every time. Oddly, if I right click the desktop shortcut and 'Run as Administrator' it DOES work, but not when double clicking or right clicking and selecting Open. Can someone else see if they are seeing this behaviour please before I submit it to support?
  14. Thanks Alan, I like that suggestion and hope to find time at the weekend to try it.
  15. I have gone back to using an older macro which I wrote to wait for a page to load in Chrome. It used the colour changes of the 'Reload' icon near the top left of the browser. Unfortunately, it looks like Google in their infinite wisdom (sic!) have decided to change the behaviour of the reload icon. It used to only change to a darker grey before fully loading the page, then it would revert to a lighter grey/white colour. The problem is, they seem to have changed its behaviour to now change to the darker grey as soon as you hover over it (which is what my test for change looked for while loading) this change has now broken my macro as it never returns to the 'loaded' state while the mouse cursor is hovering over it. Does anyone have any suggestions? Code below. Variable Set Integer %nCheck% to 0 Get Mouse Position into (nXpos, nYpos) Relative to Current Window Mouse Move: 81, 55 Relative to Current Window Delay: 100 milliseconds Repeat Until %nCheck% Equals "1" Get Pixel Color at (82, 55) Relative to Current Window into %nPixelColour% Delay: 100 milliseconds Text Box Display: If Variable %nPixelColour% Equals "14671839" Variable Set Integer %nCheck% to 1 End If End Repeat Mouse Move: %nXpos%, %nYpos% Relative to Current Window <VARIABLE SET INTEGER Option="\x00" Destination="%nCheck%" Value="0"/> <GET MOUSE POSITION Option="\x01" X="nXpos" Y="nYpos"/> <MOUSE MOVE Option="\x02" X="81" Y="55" _PROMPT="0x000A"/> <DELAY Flags="\x02" Time="100"/> <REPEAT UNTIL Variable="%nCheck%" Condition="\x00" Value="1"/> <GET PIXEL COLOR Option="\x01" Rel_To_Screen="FALSE" X="82" Y="55" Destination="%nPixelColour%"/> <DELAY Flags="\x02" Time="100"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\f0\\fs16 %nPixelColour%\r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="109" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <IF VARIABLE Variable="%nPixelColour%" Condition="\x00" Value="14671839" IgnoreCase="FALSE"/> <VARIABLE SET INTEGER Option="\x00" Destination="%nCheck%" Value="1"/> <END IF/> <END REPEAT/> <MOUSE MOVE Option="\x02" X="%nXpos%" Y="%nYpos%" _PROMPT="0x000A"/>
  16. I had an issue with macros not firing at all when engaging with Chrome. The workaround I found to work was to log macro errors to a log file. I have no idea why this worked, but it seems to have fixed my issues. To do this: 1) Double click on the macro in Macro Explorer 2) Go to the Miscellaneous tab 3) Check 'Log all errors' 4) Select 'Save to File' 5) Add something like this:- "C:\Users\YourName\Documents\Insight Software\Macro Express\Macro Logs\chrome macros.log" (without the quotes) 6) Click on [save and Close] Your documents folder may be different from mine. As I said, I don't know why this works for me and why I need to do it, but it might help get you moving in the right direction.
  17. There is this old example, but I wouldn't say that it fell into the 'easy' category. https://www.macros.com/usermacs/ummultipleinputs.htm
  18. It appears to be true, unfortunately https://msdn.microsoft.com/en-us/library/windows/desktop/hh848042.aspx.
  19. Yes, I assumed that that was what the delay was for. I tend to do that to to edge on the side of caution. Ooft! Two double words in the one post. Sorry,
  20. I just did some quick comparisons in the various compatibility modes and the sluggishness starts from Win7 onward to Win10. I understand that these are compatibility modes and not the full kernel version of the OS, so it may be different in versions prior to Win10. I also agree the line rberq mentions, seems to be redundant here and does slow macro down. Interesting, if not a bit frustrating, as I don't particularly wish to run the product in compatibility mode.
  21. I'm getting just under 9 seconds on my Windows 10 Intel i7 machine.
  22. Depending upon which version of MS Word you are using, you could try the method in my link to merge all the .doc files into one long file then Ctrl+A to select all then paste it into Excel from the clipboard. Depending on the contents of each original file of course. If there is more than 1 line of text in the original documents, they will be given more than one cell in Excel though. Link here: https://support.microsoft.com/en-us/kb/2665750
  23. I find it sometimes (randomly) hangs Windows Explorer under Windows 10 Home 64 bit. This requires stopping MX Pro and re-starting it. I haven't reported this, as it is too random to find any likely cause. Incidentally, Windows 8.1 had the same behaviour.
  24. I have an alphanumeric one too which will blow the mind.
  • Create New...