Sign in to follow this  
Followers 0
Kovacic

Halt/Freeze/Pause outlook while my prog is running

4 posts in this topic

I'm trying to have my program stop outlook and another instant messaging program while it is in a certain mode. This is because people will be scanning barcodes in another room, but instead of having to close out of the programs, I was hoping to have autoit freeze or pause other programs while it is in scanning mode. I found this chunk of code which makes me feel like I am close, but not close enough to what I want to do.

#Include <WinAPI.au3>
$process = _WinAPI_OpenProcess("PROCESS_SUSPEND_RESUME", 1, "outlook.exe")

DllCall("ntdll.dll", "Int", "NtSuspendProcess", "Int", $process)
sleep(1000)
DllCall("Kernel32.dll", "Int", "CloseHandle", "Int", $process)

I don't have much code to start with, but if anyone has any thoughts, I would be grateful!

Thanks in advance!


C0d3 is P0etry( ͡° ͜ʖ ͡°)

Share this post


Link to post
Share on other sites



I'm guessing this isn't an easy question :) 

I will continue to research this and post if I find an answer.


C0d3 is P0etry( ͡° ͜ʖ ͡°)

Share this post


Link to post
Share on other sites

Hi, Kovacic. Please give your posts a full 24 hours before you update or bump. Those of us who volunteer on the forum are all over the world in different time zones; sometimes it takes a while for us to read through and answer all the questions :)

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

This is my last bump... I promise.


C0d3 is P0etry( ͡° ͜ʖ ͡°)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • LOWLIFE
      By LOWLIFE
      This is a personal project to log into several facebook accounts and send a message to a specific person on their birthday. I need to stop a script in a few different ways for several different reasons. For example, it might start sending the email to the wrong account, it might do something other than send a message, it might fail to logout of one account, etc. 
      1) Pause the script at it's exact location with a resume feature in case I need to put it on hold while I do another task. 
      2) Pause the script at it's current location with the option to start over or execute another part of the script (example in GUI with multiple buttons). 
      Also, is there a way to interact with menus? If I log into facebook how can I force it to go straight to sending a message to the proper person? I tried automating a mouseclick but the window opens in different places. I also tried searching for specific text and I couldn't get any information from the windows info tool on the facebook page. 
      Also, how do I get my code in here to show like it does in my editor? (scite)
      Thanks for looking at it, and any help/suggestions I sgreatly appreciated!
      <snip>
    • Ian_Mac
      By Ian_Mac
      Okey guys , here's the thing, My script is running fine, but when it's already running i cant   turn it off or pause by clicking the on/off button  unless i manually close it on my taskbar. What i wanted to happen is "if i click the ($switch = turn On and Off Button) to Off the script will STOP Running but not closing the entire GUI because i tried to use Exit and ExitLoop but it closes the entire GUI. and i don't want that to happen.  
      BTW. I'm new in AutoIT and practice scripting hope somebody could help me  Godbless. feel free to view my script
      Practice.au3
    • IamKJ
      By IamKJ
      So I have a lot of different functions in the little program I'm making.  Most of them use the Do statement, such as finding images, clicking buttons, etc.
       
      The question I have is how would I be able to both
      1) Create a hotkey to pause whatever I am doing at the moment.  If I have to put something into every function in the program, I don't mind.
      2) Create a hotkey to exit whatever I am doing and stop all loops or commands and bring back the main GUI?
    • Meobdg
      By Meobdg
      Hi, I have a problem, my functions do not work with each other. Separately, each works very well. Features that do not work together it's loot() and  pos1(). It looks that after spreadsheet function loot() script stops working even though everything is in the While 1-Wend loop.  Can someone help me please?