Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/24/2014 in all areas

  1. Maybe this can help... Simple approach... #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $onoff1 = 1 GUICreate("MY GUI") $button1 = GUICtrlCreateButton("OFF", 50, 50, 50, 50) $button2 = GUICtrlCreateButton("OFF", 150, 150, 50, 50) $button3 = GUICtrlCreateButton("OFF", 250, 250, 50, 50) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit If $msg = $button1 Then If $onoff1 = 1 Then GUICtrlSetData($button1, "ON") $onoff1 = 0 Else GUICtrlSetData($button1, "OFF") $onoff1 = 1 EndIf EndIf ;continuwe here WEnd
    1 point
  2. @Malkey You and I both misunderstood the OP. He wanted update his scripts to use Ternary op instead, not look to recreate _Iif. But I suppose that'll work if he wants a quick fix. Dealing with two trains of thought here. Quick fix is what Malkey suggested, coolness would be to use regex to update your scripts...but that is also beyond me. I would opt for an easy fix. This might also work. (untested) Func _Iif($vExpression, $vTrue, $vFalse) Return ($vExpression) ? $vTrue : $vFalse EndFunc
    1 point
×
×
  • Create New...