Jump to content
Macro Express Forums

amonaghan

Members
  • Content count

    52
  • Joined

  • Last visited

Community Reputation

0 Neutral

About amonaghan

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Kirkcaldy, Scotland
  1. Cool file downloader

    That's what I'm working towards, possibly doing it all from within Excel. I'm going to use MEP to tie all bits together in the meantime until I suss more out. You've given me a really good start though, so thanks again Cory. Having to leave it until the weekend as I am currently job hunting and have an appointment tomorrow to prepare for. (Not an interview yet).
  2. Cool file downloader

    That's excellent Cory. I can work with this now. I looked at that GET too, but didn't expand it enough to see the pricing information. A lot of work still for me to do, but I think I can manage it from here. I've even got some sort of working data in Excel now. Definitely bedtime now. Thanks again, Alan
  3. Cool file downloader

    Cory, I've searched high and low through the URL I posted and can't find any reference to the link you posted. Where did you find that from? How did you know to use the bold part, as I can't find any reference to it in the rest of the code? https://www.premierinn.com/whitbread-services-unsecured/hotels/search/54.97814/-1.61622/40. Incidentally, great work so far, I still need date/price info, but don't know where (other than trawling through all the code) where or what link to use. I found several JSON->CSV/XLSX converters online for later as I tried loading as JSON data file in Excel 2016 but not yet experienced enough in handling the Data module (formally Power Pivot). Alan
  4. Cool file downloader

    Cory, here's a couple of images:- Alan
  5. Cool file downloader

    Cory, I know this is an old thread, but I can use the above External Script to grab a hotel website code, but this doesn't seem to include the data elements as displayed when using Chrome. I know I can fudge it and do the following:- 1) Go to Elements tab 2) Select Top most element 3) Edit as HTML 4) Select All 5) Copy etc. but this kind of defeats the purpose of using VBscript. Do you know what lines in the above code that I need to change so that I can download the actual 'Elements' script rather than just the surrounding HTML code? I've looked at the code above and can't see how to do this. Regards, Alan
  6. Is the drop-down list on a web page? If so, you might be better viewing the HTML code and parsing that instead.
  7. Problem pasting to PaintShop Pro

    Terry, I'm on Windows 10 Home Version 1709 build 16299.214 if it helps.
  8. Problem pasting to PaintShop Pro

    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
  9. Problem pasting to PaintShop Pro

    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?
  10. Retrieve Sheetname from Excel

    They both look identical to me.
  11. Append Macro Data to Shared Google Sheet

    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
  12. Date arithmatic

    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.
  13. Date arithmatic

    I got the second last variable wrong in the DG. Output should be this:-
  14. Date arithmatic

    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.
  15. Date arithmatic

    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.
×