wafuh Posted February 1, 2008 Share Posted February 1, 2008 hi forum, may i ask of you whats the best condition will i use to check errors on saving.. i need to prompt user that all fieds are filled in first before clicking the save button and save all changes attached is my simple script.. best regards, wafuhsaving.au3 Link to comment Share on other sites More sharing options...
whim Posted February 1, 2008 Share Posted February 1, 2008 Checked your code on v. 3.2.10.0, and noticed a couple of problems: ; Global Const $WM_NOTIFY = 0x004e ; Global Const $LVN_ITEMCHANGED = 0xFFFFFF9B needed to comment these out ("already defined") it then ran, but you are using OnEvent mode AND you have a While/Wend with GUIGetMsg, that's not allowed - from the helpfile for GUICtrlSetOnEvent: "OnEvent functions are only called when the option GUIOnEventMode is set to 1 - when in this mode GUIGetMsg is NOT used at all" Please, do yourself a favour and fix that first ! Link to comment Share on other sites More sharing options...
wafuh Posted February 1, 2008 Author Share Posted February 1, 2008 thanks for the info whim.. those codes were inherited from my main script. supposingly i dont have those conditions. my only concern is the saving function. ;~ Func Save()- I NEED TO PUT AN ERROR MESSAGE THAT ALL ENTRIES ARE REQUIRED TO FILL IN BEFORE SAVING.. ; I NEED TO USE A CONDITIONAL SCRIPT THAT ITEMS CAN ONLY BE SAVED IF STATUS, NOTES, BRANCH & CONTACT PERSON ARE ALL FILLED INFunc Save() $Get_Notes = GUICtrlRead($Text) $Get_Branch = GUICtrlRead($C_Branch) $Get_Radio = GUICtrlRead($GUI_CHECKED) FileOpen ("ribbon.csv",2) FileClose ("ribbon.csv") _FileWriteFromArray("ribbon.csv", $Items_Array) ;conditional statement here... MsgBox(0,"Save","all required field should be filled in first before saving",3)EndFunc do you have any conditional statement sample or script that would help??any1 has a sample script? ive been searching every single script on the GUI support. have thought that i might get it from the forum faster that my proof reading..ty in advance Link to comment Share on other sites More sharing options...
whim Posted February 1, 2008 Share Posted February 1, 2008 OK, let me simplify it a bit then. You CAN NOT MIX these 2 fundamental ways of operation. Just think: would you want to use a business application (I assume this is) with an error in the core logic ? Link to comment Share on other sites More sharing options...
wafuh Posted February 1, 2008 Author Share Posted February 1, 2008 yup i got your point whim, and i have read it a lot of times from the help itself. lets just say i mistakenly included it and i got it from my other tests scripts that i've used for testing and discovering other autoits gui controls. and lets just pretend i only posted my saving function who needs a little suggestion from the expert out there who have had made scripts like that the past months.. any one who happens to have an idea about what im asking for?.. ty to you in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now