Jump to content
Sign in to follow this  
xzaz

ControlCommand > error

Recommended Posts

xzaz

if $msg = $ButInsertRL Then
    $insert = ControlCommand("","",$NewFileEdit,"EditPaste",ControlCommand("","",$EditFile,"GetSelected" )&@CRLF)
    if $insert = 0 Then msgBox(0,"Error!","Error!")
Endif

How do i stop the 0 from beeing pasted into the $EditFile (_GuiCtrlCreateEdit), it says here it has a error (0) but the data is pasted already, @error doesn't seems to work.

Share this post


Link to post
Share on other sites
Bowmore

if $msg = $ButInsertRL Then
    $insert = ControlCommand("","",$NewFileEdit,"EditPaste",ControlCommand("","",$EditFile,"GetSelected" )&@CRLF)
    if $insert = 0 Then msgBox(0,"Error!","Error!")
Endif

How do i stop the 0 from beeing pasted into the $EditFile (_GuiCtrlCreateEdit), it says here it has a error (0) but the data is pasted already, @error doesn't seems to work.

ControlCommand when used with the "EditPaste" command always returns 0 whether the command is successful or not.

You need to check the value of @error to seen if it was successful @error = 0 mean it worked @error <> 0 means if faild

Edited by Bowmore

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
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
Sign in to follow this  

×