Jump to content

error message before saving


wafuh
 Share

Recommended Posts

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

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 IN

Func 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...