Jump to content

krutou

Members
  • Posts

    3
  • Joined

  • Last visited

krutou's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Just wanted to point out that the StringFormat documentation has an example that is completely wrong. Not only does it use PrintFormat, which is not a real AutoIt function, but the order of the parameters in the example is also wrong. The example shows the $var first before the "format control", whereas StringFormat is "format control" first, then $var1, $var2, ... According to the Wayback Machine, the parameter order has been wrong since Feb 20, 2014...
  2. When I say the function won't activate at all, I mean neither the If (controlsend space to VLC) nor the Else (controlsend space to Firefox) will trigger.
  3. Having weird issues with switching states via variable control ($handleState) On initial run, the ` function (pausePlay) works correctly with VLC. However, after pressing F5 (whether once or twice) the function no longer activate correctly with VLC or Firefox. However, if I add ToolTip() into the pausePlay function (currently commented in the code below), suddenly the script works as expected, and the function will trigger after F5 is pressed. I've used variable to change the state of a script numerous times before (in fact, the full version of this script has another state change, which works fine), but this is the first time I've had this issue. Global $handleState = 0 Opt("WinTitleMatchMode", 2) HotKeySet("{F1}", "quit") Func quit() Exit EndFunc HotKeySet("{F5}", "changeHandle") HotKeySet("`", "pausePlay") Func changeHandle() If $handleState = 0 Then $handleState = 1 ToolTip("Anki Symbol Firefox" & @CRLF & "F1 Exit; F4 Help", 0, 0) Else $handleState = 0 ToolTip("Anki Symbol VLC" & @CRLF & "F1 Exit; F4 Help", 0, 0) EndIf EndFunc ;==>changeHandle Func pausePlay() ;ToolTip("", 0, 0) If $handleState = 0 Then ControlSend(WinGetHandle("VLC"), "", "", "{SPACE}") Else ControlSend(WinGetHandle("Firefox"), "", "", "{SPACE}") EndIf EndFunc ;==>pausePlay While 1 Sleep(10000) WEnd
×
×
  • Create New...