Jump to content

Search the Community

Showing results for tags '_singleton'.

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 7 results

  1. @guinness mentioned in a different thread an Approach, I honestly do not 100% how to use it. I have a script, that shall run on one Windows box only once. If started more than once, it shall not Exit itself, but kill the other processes using the same _Singleton "$sOccurrenceName". So what I would Need is the PID(s) of the *OTHER* instances, that use the same "$sOccurrenceName". This may be from a different logon ("global\"), and the @scriptname might be different, too. (someone might rename the EXE, for what sensless reason whatsoever...) TIA, Rudi.
  2. I have used _Singleton function in my script to restrict only one instance to run. For testing, I have written below code, and triggered multiple instances. #include <Misc.au3> MsgBox(0,"",@ScriptName) if _Singleton(@ScriptName, 1) = 0 Then Msgbox(64, @ScriptName, "The program is already running.") Exit Else MsgBox(0,@ScriptName,"No other instances running") EndIf But all are going to else block. Please suggest.
  3. i Tried Using Function _single ton It Works Like Charm on same computer But it is unable to catch up when 2 instance of exe are launched in lan pc I would also like to know if there was a way to make particular number of instance work like allow 4-5 instance of same exe to run
  4. This is just a little helpful script, that I started using a month or so ago (one program so far), with this version having a Restore ability added (so now using with two programs of mine, as of tonight). You can find other alternatives or similar scripts here, the most recent being - _SingleScript guinness also has something much more elaborate, that is well worth checking out - _SingletonHWID. Just place the following at the beginning of your script, and adjust where needed and wanted (including Scriptname, variable names and MsgBox magic numbers, etc). Perhaps you should read and use the fo
  5. Hi. I'm a teacher and I do a lot of tutorials and other presentations on my computer. I've developed a tool using AutoIt and Adobe AIR to display all the shortcuts I use while I'm presenting. According to the forum rules this would mean that I've developed a keylogger, so I can't show any of the code, but I'm still hoping someone will help me solve an issue I'm having - a memory leak (or at least I think that's it). I can see the application is taking up more and more memory, but it never goes super crazy. I think it was at 25 MB at one point and that was it. However I see that the longer the
  6. Hello , Please look at the code below: ; This is not the real script that I use for my project!!! This decoy script helps you understand better ;) #include "Misc.au3" Global $sProgramIdentifier Func Test($sIdentifier) $sIdentifier = $sProgramIdentifier Switch _Singleton($sProgramIdentifier, 1) Case 0 MsgBox(64, "Testing, Testing", "Its working!!") Case Else MsgBox(64, "Testing, Testing", "Its not working!!") EndSwitch EndFunc Test("Lick the lemon") Save this to a file and run it, you will get a MsgBox telling "Its not working!!" Again, Run the script a second-time without
  7. I just noticed that Trac ticket #2108 was closed as "No bug". I understand that the code as it is now might already be broken because it does more than originally intended. On the other hand the change smartee proposed solved my problem (described ). I implemented and tested smartees code and it now allows to sequentially run compiled scripts an application I can't control starts in a bunch. I think every code change that enhances the functionality of AutoIt should be welcome. In particular when its jut 2 lines of code and the risk of side effects is minimal. I vote for implementing smartees
×
×
  • Create New...