Jump to content

Search the Community

Showing results for tags 'reentrant'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Let start with some examples: 1. (As seen in another topic: '?do=embed' frameborder='0' data-embedContent>> ). Script copied from that topic Interrupt function can be any hotkey/event/adlib/callback. If-check inside interrupted function/script ; HotKeySet, or any function that can cause script interrupt HotKeySet("{Delete}", "RemoveSelectedControl") ;... Dim $InfoAboutControls[4096] Global $HandleForCurrentControl ;... While 1 $msg = GuiGetMsg() ;.... ;---Code to process moving a control (drag-n-drop)--- ; If check in MAIN LOOP (interruptible function). If $HandleForCurrentControl > 0 Then;Make sure we have a valid control handle ; ***** oops user pressed Delete key and we get pre-empted ; ***** user removed the selected control. ; ***** Returning from the RemoveSelectedControl function and resuming here: GuiCtrlSetPos($InfoAboutControls[$HandleForCurrentControl], $newLeftPosition, $newTopPosition) EndIf WEnd Func RemoveSelectedControl() $HandleForCurrentControl = -1 EndFunc 2. If-check inside interrupt function Hotkey only. Flag is set right after if check. It's possible or not this function print twice or more? HotKeySet("{Delete}", "_TestHotkey") Func _TestHotkey() Static $bFlag = True If ($bFlag) Then ; ***** Right here, user pressed Delete key ; ***** bFlag is currently not set ; ***** And the script will execute this function twice or more times, instead of just once $bFlag = False ConsoleWrite("This should be printed only ONCE") EndIf EndFunc 3. Same as 2, but with global flag The question is: can I rely on if-checking with a flag, to ensure that my script doesn't do any strange things, as describe in the above examples?
×
×
  • Create New...