Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
copying a past date into
#1
Hi, I'm really new at this and need some help. What I'd like to do is creat a window where I can enter a specific date in MM/DD/YYYY format and then be able to use that date in another macro in which I would copy that date into a text field in my billing program.

This is my situation. I'm a medical biller. When insurance payments come in, I sometimes cannot post the payments to my billing software on the date it was received. However, when I post the payments received I post it using the date that the payment was actually received and not today's date.

Obviously, I don't really need a macro to do this because I can just change the system date on my computer......but the problem with that is, that everything I post will default to that past date and today's payments won't get posted to today but to a few days ago. I don't want to have to keep switching the system date all the time.

Anyone have any suggestions?

Thanks
#2
Macro "DateInit". Creates global variable g_date and shows input box to populate it with date entered.

Code:
Copy      Help
str+ g_date
inp- g_date "" "" _s.time("%m/%d/%Y")

Macro "DatePaste". Pastes that variable. If it isn't initialized, runs "DateInit" instead.

Code:
Copy      Help
str+ g_date
if(!g_date.len) mac- "DateInit"
outp g_date
#3
Wow, that was exactly what I needed. Thank you so much. The only question I still have is when the input box appears and I go to enter the date, I would like to have the /'s automatically entered so that I don't have to manually add the /'s between month/day and day/year. Even if it can't be done, this program is absolutely amazing. I've tried at least 5 other programs and none have compated to this one.

You'll be receiving my registration payment gladly -- and soon.

Thanks!
#4
Macro "DateInit". Allows to enter date, and stores it into global str variable g_date, in mm/dd/yyyy format.
Code:
Copy      Help
/Dialog_Editor

str controls = "3 4 5"
str e3D e4M e5Y
e3D.time("%#d")
e4M.time("%#m")
e5Y.time("%Y")
if(!ShowDialog("DateInit" 0 &controls)) ret

str+ g_date.format("%02s/%02s/%s" e4M e3D e5Y)
out g_date

;BEGIN DIALOG
;0 "" 0x10C80A46 0x100 0 0 69 78 "QM - Date"
;3 Edit 0x54032000 0x204 34 22 32 14 "D"
;4 Edit 0x54032000 0x204 34 4 32 14 "M"
;5 Edit 0x54032000 0x204 34 40 32 14 "Y"
;6 Static 0x54020000 0x4 4 22 26 13 "Day"
;7 Static 0x54020000 0x4 4 4 26 13 "Month"
;8 Static 0x54020000 0x4 4 40 26 12 "Year"
;1 Button 0x54030001 0x4 12 60 48 14 "OK"
;END DIALOG
;DIALOG EDITOR: "" 0x2010400 "*" ""


Forum Jump:


Users browsing this thread: 1 Guest(s)