Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to input into dialog edit box in currency format
#1
hello,

I have created a macro which when called up presents a dialog box and allows the user to select from combo boxes, details for construction jobs.
when everything is selected the macro then paste's a text block of all details into the application which the macro was called from.

My question is how do I set up the dialog to have one of the edit box's (e7Pri) accept only numbers in double format i.e 0000.00. then when this is output
convert it to currency format i.e £0000.00

I am just starting to learn Quickmacros, and this particular problem has me beat.





Function Dialog7
Code:
Copy      Help
;\Dialog_Editor


;BEGIN DIALOG
;0 "" 0x90C81AC8 0x0 0 0 201 173 "Installation Detail"
;3 ComboBox 0x54230242 0x0 70 12 100 213 "Site"
;4 ComboBox 0x54230242 0x0 70 30 100 213 "HouseType"
;5 Edit 0x54030080 0x200 70 48 100 14 "PlotNo"
;6 Edit 0x54032080 0x200 70 66 100 14 "CPR"
;7 Edit 0x54030040 0x200 70 84 50 14 "Price" "Enter the installation price in here"
;8 Static 0x54000200 0x0 16 12 48 13 "Site:"
;9 Static 0x54000200 0x0 16 30 48 12 "Housetype:"
;10 Static 0x54000200 0x0 16 48 48 13 "Plot No:"
;11 Static 0x54000200 0x0 16 66 48 12 "CPR No:"
;12 Static 0x54000200 0x0 16 84 48 13 "Price:"
;13 Button 0x54012003 0x0 70 104 48 12 "Complete:"
;2 Button 0x54030000 0x4 120 124 48 14 "Cancel"
;1 Button 0x54030001 0x0 70 124 48 14 "OK"
;END DIALOG
;DIALOG EDITOR: "" 0x2030502 "" "" "" ""


Macro Macro29
Trigger CS(223)     Help - how to add the trigger to the macro
Code:
Copy      Help
out
str controls = "3 4 5 6 7 13"
str cb3Sit cb4Hou e5Plo e6CPR e7Pri c13Com status
if(dir("D:\Automation\Quick Macros 2\Macro Text Files\sites.txt"))
,cb3Sit.getfile("D:\Automation\Quick Macros 2\Macro Text Files\sites.txt")
else mes "The Sites.txt file does not exist, please create it first ";ret
ARRAY(str) a1=cb3Sit
a1.sort(2)
cb3Sit=a1
if(dir("D:\Automation\Quick Macros 2\Macro Text Files\Housetype.txt"))
,cb4Hou.getfile("D:\Automation\Quick Macros 2\Macro Text Files\Housetype.txt")
else mes "The Housetype.txt file does not exist, please create it first ";ret
ARRAY(str) a2=cb4Hou
a2.sort(2)
cb4Hou=a2
if(!ShowDialog("Dialog7" 0 &controls)) ret
if c13Com=1
,status = "complete installation";    
else status =
F
;incomplete installation
;Items requiring attention.....
TO_CBGetItem(cb3Sit);TO_CBGetItem(cb4Hou)
str output=
F
;------------------------------
;Site :     {cb3Sit}
;Housetype: {cb4Hou}
;Plot No:   {e5Plo}
;CPR No:    {e6CPR}
;Price:     £{e7Pri}
;------------------------------
;{status}
paste output


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)