
PieMan
Active Members-
Posts
36 -
Joined
-
Last visited
Everything posted by PieMan
-
..... Might help if I update AutoIT!!! Lol! It now works like a charm! Cool, a drag and drop feature! Here is something you might want to try, I have set mine up just the way I like it but I have left over blank buttons. Maybe insert in a function that allows you to remove any unused buttons? Once again very nice!
-
Hi Playlet! First of all i'd like to say what a nice little quicklaunch utility you have here! This is going to make my life much easier. But I keep getting this error message when i run it:
-
Thanks for the example, It doesn't exactly work the way I like too but you have just given my another idea with your example code. Thanks for the inspiration and your help!
-
I got a quick question with Input Boxes. I would like to restrict the user from typing any numbers in the input box but allow Alphabetical characters and white space. Is there something like: $ES_NUMBER I can use? Thanks,
-
................ wow. I love the water effect!
-
Reading Checkboxes in a non AutoIT Gui
PieMan replied to PieMan's topic in AutoIt General Help and Support
Excellent! Worked like a charm! Thanks! -
Hi, Is it possible to read a Check box from a non AutoIT GUI to see if it has been checked or not...? Thanks,
-
Very nice! This will really help me out in one of my programs Just one thing though... Is it possible to block all input except for a certain window? I see here you can block input on just a specified window but what about the other way round?
-
Cheers!
-
Hi, I need some help seperating words in a string into seperate variables. Currently my script reads from a gui, and pulls out a date in this format xx/xx/xxxx. what i would like to do is seperate each number between the /. How would i go about this? Thanks!
-
Is it possible to pull data from a drop down box?
PieMan replied to PieMan's topic in AutoIt General Help and Support
Great thank you so much... its not fully working but at least it's pulling the data from the list (my code). -
Quick and easy Q. about MsgBox... :D
PieMan replied to PieMan's topic in AutoIt General Help and Support
Excellent! Thanks! -
Quick question, how do i add a variable to display along with predefined text... example: $var = "Hello" MsgBox(0, "", $var " how are you?") Thanks!
-
hahahah anyways .... Thanks!
-
.... why didn't you tell me to remove it lol.....? EDIT: I used Koda designt to formulate that section .... don't know y it put that in there :S
-
ok i found out my problem..... i dont know how this code got into my script and i dont even know what it does but it was these lines: Dim $MatterCreationForm_1_AccelTable[1][2] = [["{NUM 5}", $MenuExit]] GUISetAccelerators($MatterCreationForm_1_AccelTable) EDIT: btw, it was SHIFT + N not CTRL + N
-
Ok thanks for the advice, ill give it a go in a sec. Now I've removed all the "crap" (Functions) and my code still is giving me the problem with Shift + N: #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=F:\Affinity\Affinity Script Resources\icon.ico #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Hilmy Abdic Script Function: Automate matter creation in Affinity #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here WinWaitActive("Matter Creation") $destination = "F:\Affinity\Affinity Script Resources\affinityB.JPG" SplashImageOn("Matter Creation Form", $destination,288,236) WinSetOnTop("Splash Screen", "", 1) Sleep(3000) SplashOff() Global $Date, $DTM_SETFORMAT_, $style, $validation, $Alpha, $Sinput, $Linput, $Value, $InputDisb1 #include <ButtonConstants.au3> #include <DateTimeConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $MatterCreationForm_1 = GUICreate("New Matter Creation Form", 485, 555, 192, 114) $MenuFile = GUICtrlCreateMenu("&File") $MenuClear = GUICtrlCreateMenuItem("Clear Fields", $MenuFile) $MenuExit = GUICtrlCreateMenuItem("Exit", $MenuFile) $MenuHelp = GUICtrlCreateMenu("&Help") $MenuAbout = GUICtrlCreateMenuItem("About", $MenuHelp) $Label1 = GUICtrlCreateLabel("*Instructed:", 8, 32, 54, 17) $Label2 = GUICtrlCreateLabel("Matter Creation", 168, 8, 79, 17) $Date = GUICtrlCreateDate("", 112, 32, 186, 21) $InputAlpha = GUICtrlCreateInput("", 112, 64, 121, 21) $InputSDescrition = GUICtrlCreateEdit("", 112, 96, 289, 57, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetLimit($InputSDescrition, 85) GUICtrlSetData(-1, "") $InputLDescrition = GUICtrlCreateEdit("", 112, 168, 289, 81, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetLimit($InputLDescrition, 400) GUICtrlSetData(-1, "") $InputRef = GUICtrlCreateInput("", 112, 272, 121, 21) $Label4 = GUICtrlCreateLabel("*Short Description:", 8, 88, 88, 17) $Label5 = GUICtrlCreateLabel("*Long Description:", 8, 168, 87, 17) $Group1 = GUICtrlCreateGroup("Financial", 17, 305, 255, 151) $Label7 = GUICtrlCreateLabel("Expected Value:", 24, 320, 85, 17) $Label8 = GUICtrlCreateLabel("Credit Limits:", 72, 352, 63, 17) $Label9 = GUICtrlCreateLabel("*Fees:", 24, 376, 30, 17) $Label10 = GUICtrlCreateLabel("*Disbursements:", 24, 400, 76, 17) $Label11 = GUICtrlCreateLabel("Overall Limit:", 24, 424, 64, 17) $InputEValue = GUICtrlCreateInput("", 112, 320, 73, 21) GUICtrlSetState(-1, $GUI_DISABLE) $InputFees = GUICtrlCreateInput("", 109, 373, 73, 21) $InputDisb = GUICtrlCreateInput("", 109, 397, 73, 21) $Label13 = GUICtrlCreateLabel("(Optional)", 208, 392, 49, 17) $InputOverLimit = GUICtrlCreateInput("", 109, 421, 73, 21) GUICtrlSetState(-1, $GUI_DISABLE) $ChkAuth = GUICtrlCreateCheckbox("Authority", 192, 376, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Billing = GUICtrlCreateGroup("Billing", 280, 304, 169, 153) $RadioTaxBill = GUICtrlCreateRadio("Taxable Bill", 288, 352, 113, 17) $Label3 = GUICtrlCreateLabel("Tax Status for New Bills:", 288, 328, 122, 17) $RadioExportBill = GUICtrlCreateRadio("Export Bill", 288, 385, 113, 17) $RadioOther = GUICtrlCreateRadio("Other Tax-free Bill", 288, 416, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $ButtonPopulate = GUICtrlCreateButton("Populate Fields", 184, 480, 123, 33, $WS_GROUP) $Label6 = GUICtrlCreateLabel("Alpha (Optional):", 8, 64, 96, 17) $Label12 = GUICtrlCreateLabel("Your Ref. (Optional):", 8, 272, 100, 17) ;$BtnSLcopy = GUICtrlCreateButton("Copy", 408, 136, 67, 41, $WS_GROUP) GUISetState(@SW_SHOW) Dim $MatterCreationForm_1_AccelTable[1][2] = [["{NUM 5}", $MenuExit]] GUISetAccelerators($MatterCreationForm_1_AccelTable) #EndRegion ### END Koda GUI section ### ; to select a specific default format $DTM_SETFORMAT_ = 0x1032 $style = "dd/MM/yyyy" GUICtrlSendMsg($Date, $DTM_SETFORMAT_, 0, $style) ;Sets radio button to be checked at load GuiCtrlSetState($RadioTaxBill, $GUI_CHECKED) WinSetOnTop ("New Matter Creation Form", "", 1) While 1 $nMsg = GUIGetMsg() ;this makes sure the window is always active If Not WinActive($MatterCreationForm_1) Then WinActivate($MatterCreationForm_1) Switch $nMsg Case $GUI_EVENT_CLOSE Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit Case $ButtonPopulate If $validation = 0 Then BlockInput(1) WinSetState("New Matter Creation Form", "", @SW_MINIMIZE) WinActivate("Matter Creation") Sleep(200) Opt("SendKeyDelay", 10) Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit ElseIf $Validation = 1 Then WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(16, "STOP", "Not all the required fields have been entered, please fill out the required fields (*) and try again.") WinSetOnTop ("New Matter Creation Form", "", 1) ElseIf $validation = 2 Then WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(16, "STOP", "You can only enter in numbers in the Financial section. Please amend and try again") WinSetOnTop ("New Matter Creation Form", "", 1) EndIf Case $MenuAbout WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(0, "About", "Written By: Hilmy Abdic V1.0") WinSetOnTop ("New Matter Creation Form", "", 1) Case $MenuExit Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit EndSwitch WEnd ;my functions go here but ive removed them for simplicity
-
This is really wierd.... After getting a report back from my testing group for my script, they said that the GUI Closes/Hides when ever they enter SHIFT+N. There is no reference in my code for SHIFT+N to hide/close the GUI i dont think plus the script is still running.... Any ideas? Here is my code #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=F:\Affinity\Affinity Script Resources\icon.ico #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Hilmy Abdic Script Function: Automate matter creation in Affinity #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here WinWaitActive("Matter Creation") $destination = "F:\Affinity\Affinity Script Resources\affinityB.JPG" SplashImageOn("Matter Creation Form", $destination,288,236) WinSetOnTop("Splash Screen", "", 1) Sleep(3000) SplashOff() Global $Date, $DTM_SETFORMAT_, $style, $validation, $Alpha, $Sinput, $Linput, $Value, $InputDisb1 #include <ButtonConstants.au3> #include <DateTimeConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $MatterCreationForm_1 = GUICreate("New Matter Creation Form", 485, 555, 192, 114) $MenuFile = GUICtrlCreateMenu("&File") $MenuClear = GUICtrlCreateMenuItem("Clear Fields", $MenuFile) $MenuExit = GUICtrlCreateMenuItem("Exit", $MenuFile) $MenuHelp = GUICtrlCreateMenu("&Help") $MenuAbout = GUICtrlCreateMenuItem("About", $MenuHelp) $Label1 = GUICtrlCreateLabel("*Instructed:", 8, 32, 54, 17) $Label2 = GUICtrlCreateLabel("Matter Creation", 168, 8, 79, 17) $Date = GUICtrlCreateDate("", 112, 32, 186, 21) $InputAlpha = GUICtrlCreateInput("", 112, 64, 121, 21) $InputSDescrition = GUICtrlCreateEdit("", 112, 96, 289, 57, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetLimit($InputSDescrition, 85) GUICtrlSetData(-1, "") $InputLDescrition = GUICtrlCreateEdit("", 112, 168, 289, 81, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetLimit($InputLDescrition, 400) GUICtrlSetData(-1, "") $InputRef = GUICtrlCreateInput("", 112, 272, 121, 21) $Label4 = GUICtrlCreateLabel("*Short Description:", 8, 88, 88, 17) $Label5 = GUICtrlCreateLabel("*Long Description:", 8, 168, 87, 17) $Group1 = GUICtrlCreateGroup("Financial", 17, 305, 255, 151) $Label7 = GUICtrlCreateLabel("Expected Value:", 24, 320, 85, 17) $Label8 = GUICtrlCreateLabel("Credit Limits:", 72, 352, 63, 17) $Label9 = GUICtrlCreateLabel("*Fees:", 24, 376, 30, 17) $Label10 = GUICtrlCreateLabel("*Disbursements:", 24, 400, 76, 17) $Label11 = GUICtrlCreateLabel("Overall Limit:", 24, 424, 64, 17) $InputEValue = GUICtrlCreateInput("", 112, 320, 73, 21) GUICtrlSetState(-1, $GUI_DISABLE) $InputFees = GUICtrlCreateInput("", 109, 373, 73, 21) $InputDisb = GUICtrlCreateInput("", 109, 397, 73, 21) $Label13 = GUICtrlCreateLabel("(Optional)", 208, 392, 49, 17) $InputOverLimit = GUICtrlCreateInput("", 109, 421, 73, 21) GUICtrlSetState(-1, $GUI_DISABLE) $ChkAuth = GUICtrlCreateCheckbox("Authority", 192, 376, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Billing = GUICtrlCreateGroup("Billing", 280, 304, 169, 153) $RadioTaxBill = GUICtrlCreateRadio("Taxable Bill", 288, 352, 113, 17) $Label3 = GUICtrlCreateLabel("Tax Status for New Bills:", 288, 328, 122, 17) $RadioExportBill = GUICtrlCreateRadio("Export Bill", 288, 385, 113, 17) $RadioOther = GUICtrlCreateRadio("Other Tax-free Bill", 288, 416, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $ButtonPopulate = GUICtrlCreateButton("Populate Fields", 184, 480, 123, 33, $WS_GROUP) $Label6 = GUICtrlCreateLabel("Alpha (Optional):", 8, 64, 96, 17) $Label12 = GUICtrlCreateLabel("Your Ref. (Optional):", 8, 272, 100, 17) ;$BtnSLcopy = GUICtrlCreateButton("Copy", 408, 136, 67, 41, $WS_GROUP) GUISetState(@SW_SHOW) Dim $MatterCreationForm_1_AccelTable[1][2] = [["{NUM 5}", $MenuExit]] GUISetAccelerators($MatterCreationForm_1_AccelTable) #EndRegion ### END Koda GUI section ### ; Catch focus passing to $InputLDescrition GUIRegisterMsg($WM_COMMAND, "ED_WM_COMMAND") ; to select a specific default format $DTM_SETFORMAT_ = 0x1032 $style = "dd/MM/yyyy" GUICtrlSendMsg($Date, $DTM_SETFORMAT_, 0, $style) ;Sets radio button to be checked at load GuiCtrlSetState($RadioTaxBill, $GUI_CHECKED) WinSetOnTop ("New Matter Creation Form", "", 1) While 1 $nMsg = GUIGetMsg() If Not WinActive($MatterCreationForm_1) Then WinActivate($MatterCreationForm_1) Switch $nMsg ;Case $BtnSLcopy ;$CopySL = GUICtrlRead($InputSDescrition) ;ControlClick("New Matter Creation Form", "", "Edit3") ;Send($CopySL) Case $GUI_EVENT_CLOSE Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit Case $ButtonPopulate Validation() If $validation = 0 Then BlockInput(1) WinSetState("New Matter Creation Form", "", @SW_MINIMIZE) WinActivate("Matter Creation") Sleep(200) Opt("SendKeyDelay", 10) MatterDetails() Fdate() Sdescription() Ldescription() Financial() Billing() Contacts() Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit ElseIf $Validation = 1 Then WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(16, "STOP", "Not all the required fields have been entered, please fill out the required fields (*) and try again.") WinSetOnTop ("New Matter Creation Form", "", 1) ElseIf $validation = 2 Then WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(16, "STOP", "You can only enter in numbers in the Financial section. Please amend and try again") WinSetOnTop ("New Matter Creation Form", "", 1) EndIf Case $MenuAbout WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(0, "About", "Written By: Hilmy Abdic V1.0") WinSetOnTop ("New Matter Creation Form", "", 1) Case $MenuExit Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit EndSwitch WEnd func Validation() $validation = 0 If GUICtrlRead($InputSDescrition) = "" Then $validation = 1 ElseIf GUICtrlRead($InputLDescrition) = "" Then $validation = 1 ElseIf Not StringIsDigit(GUICtrlRead($InputFees)) Then If Not StringIsFloat(GUICtrlRead($InputFees)) Then $validation = 2 EndIf ElseIf Not StringIsDigit(GUICtrlRead($InputDisb)) Then If Not StringIsFloat(GUICtrlRead($InputDisb)) Then $validation = 2 EndIf EndIf EndFunc Func MatterDetails() ControlClick("Matter Creation", "", "TBitBtn1") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Partner", "Please select the managing Partner for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") ControlClick("Matter Creation", "", "TBitBtn2") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Controller", "Please select the Controller for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") ControlClick("Matter Creation", "", "TBitBtn3") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Author", "Please select the Author for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") ControlClick("Matter Creation", "", "TBitBtn4") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Type", "Please select the Type for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") EndFunc Func Fdate() ControlClick("Matter Creation", "", "TPageControl1", "left", 1, 24, 10) ControlClick("Matter Creation", "", "TDateTimePicker1", "left", 1, 9, 10) Send(GUICtrlRead($Date)) Send("{TAB}") Send("{TAB}") EndFunc ;==>Fdate Func Sdescription() $Alpha = GUICtrlRead($InputAlpha) Send($Alpha) Send("{TAB}") $Sinput = StringUpper(GUICtrlRead($InputSDescrition)) Send($Sinput) Send("{TAB}") send("^a") send("{BS}") EndFunc ;==>Sdescription Func Ldescription() $Linput = StringUpper(GUICtrlRead($InputLDescrition)) Send($Linput) Send("{TAB}") $Ref = GUICtrlRead($InputRef) Send($ref) Send("{TAB 5}") Send("{RIGHT}") Send("{TAB}") EndFunc ;==>Ldescription Func Financial() $Value = GUICtrlRead($InputFees) Send($Value) Send("{TAB 3}") Send($Value) Send("{TAB}") $InputDisb1 = GUICtrlRead($InputDisb) Send($InputDisb1) $total = $Value + $InputDisb1 Send("{TAB}") Send($total) If GUICtrlRead($ChkAuth) = 1 Then ControlClick("Matter Creation", "", "TDBCheckBox2") Send("+{TAB 3}") Else EndIf EndFunc Func Billing() Send("+{TAB 6}") Send("{RIGHT 3}") ControlClick("Matter Creation", "", "TGroupButton4") Send("+{TAB 4}") Send("{RIGHT 2}") Send("{TAB 4}") If GUICtrlRead($RadioTaxBill) = 1 Then ElseIf GUICtrlRead($RadioExportBill) = 1 Then Send("{DOWN}") ElseIf GUICtrlRead($RadioOther) = 1 Then Send("{DOWN 2}") EndIf EndFunc Func Contacts() Send("+{TAB 4}") Send("{LEFT 3}") BlockInput(0) MsgBox(64, "Nearly Done...", "Please fill out all the fields in the Contacts Tab (Bill To, Contact, Referred By, Bill To Contact), Review the information and Submit. Your Done! ") EndFunc ; Func ED_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $iCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($InputLDescrition) Switch $iCode Case $EN_SETFOCUS If GUICtrlRead($InputLDescrition) = "" Then GUICtrlSetData($InputLDescrition, GUICtrlRead($InputSDescrition)) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc;==>ED_WM_COMMAND
-
Copying text between edit boxes when the user tabs down
PieMan replied to PieMan's topic in AutoIt GUI Help and Support
Wow... You are a legend mate! Thanks!!!! -
Have you tried using the send() function? send a left arrow key etc to select the correct field? Its not the best way to do it but it works....
-
I'm not sure how to do this exactly... what i want to do is when a user fills out edit box1 ($InputSDescrition) in my gui, when the tab key is pressed to go to edit box 2 ($InputLDescrition), i want the text to be copied from edit box1 to edit box2. Can anyone help? here is my code: #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=F:\Affinity\Affinity Script Resources\icon.ico #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Hilmy Abdic Script Function: Automate matter creation in Affinity #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here WinWaitActive("Matter Creation") $destination = "F:\Affinity\Affinity Script Resources\affinityB.JPG" SplashImageOn("Splash Screen", $destination,288,236) WinSetOnTop("Splash Screen", "", 1) Sleep(3000) SplashOff() Global $Date, $DTM_SETFORMAT_, $style, $validation, $Alpha, $Sinput, $Linput, $Value, $InputDisb1 #include <ButtonConstants.au3> #include <DateTimeConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $MatterCreationForm_1 = GUICreate("New Matter Creation Form", 485, 555, 192, 114) $MenuFile = GUICtrlCreateMenu("&File") $MenuClear = GUICtrlCreateMenuItem("Clear Fields", $MenuFile) $MenuExit = GUICtrlCreateMenuItem("Exit", $MenuFile) $MenuHelp = GUICtrlCreateMenu("&Help") $MenuAbout = GUICtrlCreateMenuItem("About", $MenuHelp) $Label1 = GUICtrlCreateLabel("*Instructed:", 8, 32, 54, 17) $Label2 = GUICtrlCreateLabel("Matter Creation", 168, 8, 79, 17) $Date = GUICtrlCreateDate("", 112, 32, 186, 21) $InputAlpha = GUICtrlCreateInput("", 112, 64, 121, 21) $InputSDescrition = GUICtrlCreateEdit("", 112, 96, 289, 57, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetLimit($InputSDescrition, 85) GUICtrlSetData(-1, "") $InputLDescrition = GUICtrlCreateEdit("", 112, 168, 289, 81, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetLimit($InputLDescrition, 400) GUICtrlSetData(-1, "") $InputRef = GUICtrlCreateInput("", 112, 272, 121, 21) $Label4 = GUICtrlCreateLabel("*Short Description:", 8, 88, 88, 17) $Label5 = GUICtrlCreateLabel("*Long Description:", 8, 168, 87, 17) $Group1 = GUICtrlCreateGroup("Financial", 17, 305, 255, 151) $Label7 = GUICtrlCreateLabel("Expected Value:", 24, 320, 85, 17) $Label8 = GUICtrlCreateLabel("Credit Limits:", 72, 352, 63, 17) $Label9 = GUICtrlCreateLabel("*Fees:", 24, 376, 30, 17) $Label10 = GUICtrlCreateLabel("*Disbursements:", 24, 400, 76, 17) $Label11 = GUICtrlCreateLabel("Overall Limit:", 24, 424, 64, 17) $InputEValue = GUICtrlCreateInput("", 112, 320, 73, 21) GUICtrlSetState(-1, $GUI_DISABLE) $InputFees = GUICtrlCreateInput("", 109, 373, 73, 21) $InputDisb = GUICtrlCreateInput("", 109, 397, 73, 21) $Label13 = GUICtrlCreateLabel("(Optional)", 208, 392, 49, 17) $InputOverLimit = GUICtrlCreateInput("", 109, 421, 73, 21) GUICtrlSetState(-1, $GUI_DISABLE) $ChkAuth = GUICtrlCreateCheckbox("Authority", 192, 376, 65, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Billing = GUICtrlCreateGroup("Billing", 280, 304, 169, 153) $RadioTaxBill = GUICtrlCreateRadio("Taxable Bill", 288, 352, 113, 17) $Label3 = GUICtrlCreateLabel("Tax Status for New Bills:", 288, 328, 122, 17) $RadioExportBill = GUICtrlCreateRadio("Export Bill", 288, 385, 113, 17) $RadioOther = GUICtrlCreateRadio("Other Tax-free Bill", 288, 416, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $ButtonPopulate = GUICtrlCreateButton("Populate Fields", 184, 480, 123, 33, $WS_GROUP) $Label6 = GUICtrlCreateLabel("Alpha (Optional):", 8, 64, 96, 17) $Label12 = GUICtrlCreateLabel("Your Ref. (Optional):", 8, 272, 100, 17) GUISetState(@SW_SHOW) Dim $MatterCreationForm_1_AccelTable[1][2] = [["{NUM 5}", $MenuExit]] GUISetAccelerators($MatterCreationForm_1_AccelTable) #EndRegion ### END Koda GUI section ### ; to select a specific default format $DTM_SETFORMAT_ = 0x1032 $style = "dd/MM/yyyy" GUICtrlSendMsg($Date, $DTM_SETFORMAT_, 0, $style) ;Sets radio button to be checked at load GuiCtrlSetState($RadioTaxBill, $GUI_CHECKED) WinSetOnTop ("New Matter Creation Form", "", 1) While 1 $nMsg = GUIGetMsg() If Not WinActive($MatterCreationForm_1) Then WinActivate($MatterCreationForm_1) Switch $nMsg Case $GUI_EVENT_CLOSE Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit Case $ButtonPopulate Validation() If $validation = 0 Then BlockInput(1) WinSetState("New Matter Creation Form", "", @SW_MINIMIZE) WinActivate("Matter Creation") Sleep(200) AutoItSetOption("MouseClickDelay", 15) Opt("SendKeyDelay", 10) MatterDetails() Fdate() Sdescription() Ldescription() Financial() Billing() Contacts() Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit ElseIf $Validation = 1 Then WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(16, "STOP", "Not all the required fields have been enetered, please fill out the required fields (*) and try again.") WinSetOnTop ("New Matter Creation Form", "", 1) ElseIf $validation = 2 Then WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(16, "STOP", "You can only enter in numbers in the Financial section. Please amend and try again") WinSetOnTop ("New Matter Creation Form", "", 1) EndIf Case $MenuAbout WinSetOnTop ("New Matter Creation Form", "", 0) MsgBox(0, "About", "Written By: Hilmy Abdic V1.0") WinSetOnTop ("New Matter Creation Form", "", 1) Case $MenuExit Sleep(300) Run("F:\Affinity\Affinity Script Resources\New Affinity Scripts\Matter Creation reset.exe") Exit EndSwitch WEnd func Validation() $validation = 0 If GUICtrlRead($InputSDescrition) = "" Then $validation = 1 ElseIf GUICtrlRead($InputLDescrition) = "" Then $validation = 1 ElseIf Not StringIsDigit(GUICtrlRead($InputFees)) Then If Not StringIsFloat(GUICtrlRead($InputFees)) Then $validation = 2 EndIf ElseIf Not StringIsDigit(GUICtrlRead($InputDisb)) Then If Not StringIsFloat(GUICtrlRead($InputDisb)) Then $validation = 2 EndIf EndIf EndFunc Func MatterDetails() ControlClick("Matter Creation", "", "TBitBtn1") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Partner", "Please select the managing Partner for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") ControlClick("Matter Creation", "", "TBitBtn2") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Controller", "Please select the Controller for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") ControlClick("Matter Creation", "", "TBitBtn3") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Author", "Please select the Author for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") ControlClick("Matter Creation", "", "TBitBtn4") WinWaitActive("Code Selection", "") BlockInput(0) MsgBox(64, "Type", "Please select the Type for this Matter") WinWaitClose("Code Selection", "") BlockInput(1) WinActivate("Matter Creation") EndFunc Func Fdate() ControlClick("Matter Creation", "", "TPageControl1", "left", 1, 24, 10) ControlClick("Matter Creation", "", "TDateTimePicker1", "left", 1, 9, 10) Send(GUICtrlRead($Date)) Send("{TAB}") Send("{TAB}") EndFunc ;==>Fdate Func Sdescription() $Alpha = GUICtrlRead($InputAlpha) Send($Alpha) Send("{TAB}") $Sinput = StringUpper(GUICtrlRead($InputSDescrition)) Send($Sinput) Send("{TAB}") send("^a") send("{BS}") EndFunc ;==>Sdescription Func Ldescription() $Linput = StringUpper(GUICtrlRead($InputLDescrition)) Send($Linput) Send("{TAB}") $Ref = GUICtrlRead($InputRef) Send($ref) Send("{TAB 5}") Send("{RIGHT}") Send("{TAB}") EndFunc ;==>Ldescription Func Financial() $Value = GUICtrlRead($InputFees) Send($Value) Send("{TAB 3}") Send($Value) Send("{TAB}") $InputDisb1 = GUICtrlRead($InputDisb) Send($InputDisb1) $total = $Value + $InputDisb1 Send("{TAB}") Send($total) If GUICtrlRead($ChkAuth) = 1 Then ControlClick("Matter Creation", "", "TDBCheckBox2") Send("+{TAB 3}") Else EndIf EndFunc Func Billing() Send("+{TAB 6}") Send("{RIGHT 3}") ControlClick("Matter Creation", "", "TGroupButton4") Send("+{TAB 4}") Send("{RIGHT 2}") Send("{TAB 4}") If GUICtrlRead($RadioTaxBill) = 1 Then ElseIf GUICtrlRead($RadioExportBill) = 1 Then Send("{DOWN}") ElseIf GUICtrlRead($RadioOther) = 1 Then Send("{DOWN 2}") EndIf EndFunc Func Contacts() Send("+{TAB 4}") Send("{LEFT 3}") BlockInput(0) MsgBox(64, "Nearly Done...", "Please fill out all the fields in the Contacts Tab (Bill To, Contact, Referred By, Bill To Contact), Review the information and Submit. Your Done! ") EndFunc Thanks,