Jump to content

ControlCommand > error


xzaz
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

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...