Jump to content

Recommended Posts

Posted (edited)

I am just going through and replacing all of my "Right click context menu" tools that were Windows batch scripts etc with AutoIT equivalents

Why does this work when not compiled yet when compiled produces the error "Subscript used on non-accessible variable" ??

#RequireAdmin
Func Clipath()
Local $var
If $CmdLineRaw Then
$var = StringRegExp($CmdLineRaw, '/ErrorStdOut\h+"(?:.*\\)?(.*)"', 3)
MsgBox(0, "Copied to clipboard", $var[0] & @LF & @LF & "Has been copied to clipboard", 3)
ClipPut($var[0])
Exit
EndIf
EndFunc   ;==>Clipath
Clipath()
 
Edited by DigitalFacade82
Posted (edited)

Best to use if UBound() or check @error.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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
  • Recently Browsing   0 members

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