Jump to content
Macro Express Forums

randallf

Members
  • Posts

    81
  • Joined

  • Last visited

Everything posted by randallf

  1. Hello! Running into a logic problem here that I just don't think I have the knowledge to solve: I have two sets of variables that represent times Specificially these are: (example) ex 12:01 PM Set one: N1:N3 T1 - let's say, when the timer goes off (when my case expires SLA) and Set two: N31:N32 T33 - the current time (where T1 and T33 are set to AM or PM as necessary) Can anyone provide me a function for getting the hours and minutes between these times and telling me if it is already past that time? I basically want to know how long until the timer goes off, or have it tell me if it should already have gone off... the amount of time between N31:N32 T33 and N1:N3 T1... whatever those might be. We can assume the same day for all times... the only consideration is between AM and PM... There will never be a PM time BEFORE an AM time but the reverse is of course true as that is the point of the function! THANK YOU!!!
  2. Well really I discovered there are only a few places that I need it so it is easier to <10 and type a leading zero Text Type: %N2%: :P If Variable %N4% < 10 Text Type: 0 End If Text Type: %N4% %T2% But thank you for the great reply, it's great to know more about ME in this area!
  3. Hello, I am working with functions that use integer variables to store a number of hours or minutes and short of using "if mintues variable called > 9 text type 0" every time I want to call the minutes integer, how can I force it to keep the number as "02" instead of just "2"? Would I be forced to use a string? What a pain! Thanks!
  4. I did it! Place cursor at front of a time stamp as such: 01:51:12 PM This particular macro will add 2.5 hours to that time and adjust for AM or PM. You can delete or ignore the window control part as that what detects my SLA's and makes the macro respond accordingly. Eventually there will be four parts to the macro (which will just be the math part of this one four times over)for "P1 P2 P3 P4" etc depending on what the case is. You can see that I added a lot of notes in the form of disabled text type lines to tell you what each part of the macro does when viewing it in MEX. I plan to interface with outlook to create appointments for myself so I know when I have to take action and notify technicians. Come to think of it, when it's finished I will have an anything to outlook interface, would just have to modify the data miner for whatever timestamp you are dealing with. <DIS:<TEXTTYPE:GET HOURS><TEXTTYPE:<SHIFTD><ARROW RIGHT><ARROW RIGHT><SHIFTU>><CLIPC><DELAY:.1><IVAR2:01:11:><DELAY:.1><DIS:<TEXTTYPE:GET MINUTES><TEXTTYPE:<ARROW RIGHT><ARROW RIGHT>><TEXTTYPE:<SHIFTD><ARROW RIGHT><ARROW RIGHT><SHIFTU>><CLIPC><DELAY:.1><IVAR2:02:11:><DELAY:.1><DIS:<TEXTTYPE:GET AM/PM ><TEXTTYPE:<ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT>><DELAY:.1><TEXTTYPE:<SHIFTD><ARROW RIGHT><ARROW RIGHT><SHIFTU>><CLIPC><TVAR2:01:03:><DELAY:.1><DIS:<TEXTTYPE:GET PRIORITY><ACTIVATE2:ClarifyCRM - ClearSupport><DELAY:.1><GETCONTROL2:01:CLARIFY.EXE:Afx:00400000:8:00010011:00000000:ECFB0531ClarifyCRM - ClearSupport004:1MDIClient1Afx:00400000:b:00010011:00000006:ECFB05311#3277040ComboBox><DELAY:.1><VARGETCONT:1:2><DELAY:.1><DIS:<TEXTTYPE:MODIFY PRIORITY><TMVAR2:10:02:02:001:002:><DIS:<TEXTTYPE:CHECK FOR P4><IFVAR2:1:02:1:P4><DIS:<TEXTTYPE:ADD RESOLUTION SLA MINUTES><NMVAR:01:02:1:0000002:2:0000030><DIS:<TEXTTYPE:IF MINUTES ARE NOW OVER 59 ADD ONE HOUR AND SUBTRACT 60 MINUTES><IFVAR2:2:02:4:59><NMVAR:01:01:1:0000001:2:0000001><NMVAR:02:02:1:0000002:2:0000060><ENDIF><DIS:<TEXTTYPE:ADD RESOLUTION SLA HOURS><NMVAR:01:01:1:0000001:2:0000002><DIS:<TEXTTYPE:IF HOURS ARE NOW OVER 12 CHANGE TO PM AND SUBTRACT 12 HOURS><IFVAR2:2:01:5:12><TVAR2:01:01:PM><NMVAR:02:01:1:0000001:2:0000012><DIS:<TEXTTYPE:IF HOURS ARE NOW ZERO CHANGE BACK TO 12><IFVAR2:2:01:1:0><IVAR2:01:01:12><ENDIF><ENDIF><ENDIF><TBOX4:T:1:CenterCenter000278000200:000:testerN1: %N1% N2: %N2% T1: %T1% T2: %T2%>
  5. I would use something like, <tab> move mouse to cursor right click move mouse set distance to 'copy link location' and click save clipboard to var1 and var2 modify var1 keeping only the first 7 characters if var1 equals http:// -> continue, else go back to the first line then use "IF VARIABLE" with the "CONTAINS" switch on VAR2 for your intended searching repeat Hope I helped! As a followup, why don't you write a macro that saves the HTML file of the page to a text file and then process the text file searching for hyperlinks instead? You could avoid a lot of potential issues this way. I think the help file for 'text file begin process' is pretty helpful IIRC. If you try to use tab to go through links on just whatever webpage (I'm assuming you want to do some data mining) the tab key is going to take you off-screen and move mouse to cursor might not behave like it should. To get around this you could have it save cursor position, check to see where that is (if its off-screen) and if it is do a page down until it is visible. I'm not sure how 'move mouse to cursor' works if the cursor is not visible. I would only use this option if it's required to interact with other software. The main difference here is that using text file process to save to variables and then comparing strings is going to be probably five to ten times faster than the other way around, especially if you are just doing this on whatever random webpage to count content.
  6. Hello! Long time user first time poster... I have a lot of times that I want to know how old they are by just highlighting them and hitting a macro... this is to compare SLA's for a helpdesk. The date/time is in the following format: 01/21/2009 08:14:22 AM I want a macro that will compare the date/time (just highlight, copy, insert to variable...) with the response SLA and display a window (preferably with all of these and a YES or NO or something) telling me if it is older (compared to the current time) than: 15 minutes 30 minutes 45 minutes 1 hour 2.5 hours 3 hours 4 hours 5 hours I could do one thing, since I don't have an SLA older than 5 hours, all I have to do is have it check to see if the date is today and if it is not check to see if it is earlier than 5am, however I would really love to get something that would work in future macros as well as I will be using the system with that time/date format for a long time to come. I am well versed with macro express but my programming ability is not quite up to par for a task like this. I tried so hard to get something working that would chop up the format and find the time, compare to the date, etc but I just can't wrap my head around all the variables and things needed to convert to 24 hour or to take the date itself into account... I found this: http://bluepointdesign.com/macros/Day_of_Year.htm but it doesn't seem to be what I need and I don't know enough of the theory on how it works to modify it. Can anyone help me? THANK YOU!!!
×
×
  • Create New...