Search the Community
Showing results for tags 'conditional'.
-
I'm a bit ashamed of asking this but.... I can't figure out why a simple select statement which checks a variable which contains mouse coordinates doesn't work while used with a Select Statement, while it works with an If-Else conditional statement. Select statements always returns false or 0. This isn't working Func StartIt() If CanIStart() Then MsgBox(0, "jj", "Start " & CanIStart()) Else MsgBox(0, "Kk", "NoStart" & CanIStart()) EndIf EndFunc ;==>StartIt Func CanIStart() Select Case UBound($M1Pos)<1 Return False Case UBound($M2Pos)<1 Return False Case UBound($M3Pos)<1 Return False Case UBound($M4Pos)<1 Return False EndSelect EndFunc ;==>CanIStart While this does the job pretty well Func StartIt() If CanIStart() Then MsgBox(0, "jj", "Start " & CanIStart()) Else MsgBox(0, "Kk", "NoStart" & CanIStart()) EndIf EndFunc ;==>StartIt Func CanIStart() If UBound($M1Pos)<1 Then Return False ElseIf UBound($M2Pos)<1 Then Return False ElseIf UBound($M3Pos)<1 Then Return False ElseIf UBound($M4Pos)<1 Then Return False Else Return True EndIf EndFunc ;==>CanIStart Thanks
- 4 replies
-
- select
- conditional
-
(and 1 more)
Tagged with:
-
I want to create a user context menu that's different for .au3 files than it is for .js files but I cannot get the "if" part to work. I tried modifying the SciTEUser.properties file with these lines: user.context.menu=||xxx Def|1138|xxx Ref|1139|xxx Del| if $Language = "au3" user.context.menu=||$(au3) Def|1138|$(Language) Ref|1139|AU3 Del| if $Language - "cpp" user.context.menu=||$(au3) Def|1138|$(Language) Ref|1139|AU3 Del| But this doesn't work. I always see the first menu (xxx) when I right click in either the .au3 file or the .js file.