Jump to content

Hiding a program from the taskbar etc


Recommended Posts

Hi everyone! :)

first off i will only use this script for private purposes - i wont send it to anyone.

I need a script that i will put in my autostart. it has to run a specific .exe and immediately hide it from the taskbar, so people cannot see it (it can appear in taskmanager tho, i dont care about that).

Ill just call that .exe "program1" for now. the thing is, that the program1 will automatically close if program2 is being run.. so it needs to be started again by the script, when program2 is being closed.

this might sound complicated at first but infact its quite simple. i just need to hide the program1 from any other people and still having it running ;)

so my primary question is, is it possible to hide a program completely from the taskbar etc with autoit3? and how? :D

thanks alot to anyone who tries to help me

Link to comment
Share on other sites

Something like this?

HotkeySet("{esc}","_quit")
While 1
    $iPid  Run("Program1.exe","".@SW_HIDE)
    While ProcessExists($iPid)
        Sleep(250)
    WEnd
    
    While ProcessExists("Process2.exe")
        Sleep(250)
    WEnd
    
WEnd

Func _quit()
    Exit
EndFunc
Link to comment
Share on other sites

  • Moderators

OnAutoItExit

Anymore information than that is typical of malware type.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thanks to anyone so far, i got the basics of the code i need now :)

But, is there any way to let the script check if a process is being closed? cause i need to run the program1 again immediately if the program2 is being shut down.

What I wrote does that, you just need to know what the process is called for Program2, it's in a loop

You run Program1, it loops until program2 closes it, then it loops while program2 is running then when program2 exits it goes back to the beginning and launches program1

Link to comment
Share on other sites

What I wrote does that, you just need to know what the process is called for Program2, it's in a loop

You run Program1, it loops until program2 closes it, then it loops while program2 is running then when program2 exits it goes back to the beginning and launches program1

oh - thank you, gotcha now :)

well, i worked my own code out and it works like a charm now (might look a bit inconvenient in your eyes but its fine for me)

#NoTrayIcon
ProcessSetPriority ( "script.exe" , 0 )


If ProcessExists ( "program1.exe" ) Then
    ProcessClose ( "program1.exe" )
EndIf

        Sleep (250)
        
Run ("program2.exe" , "" , "@SW_HIDE")
ProcessWait ( "program2.exe" )

If ProcessExists ( "program2.exe" ) Then
ProcessWaitClose ( "program2.exe" )
EndIf

Run ( "script.exe" )

thank u all =]

Link to comment
Share on other sites

This looks better:

#NoTrayIcon

ProcessSetPriority("Script.exe", 0)

If ProcessExists("Program1.exe") Then ProcessClose("Program1.exe")

Sleep (250)
        
Run("Program2.exe",  "" , "@SW_HIDE")

ProcessWait("Program2.exe")

If ProcessExists("Program2.exe" ) Then ProcessWaitClose("Program2.exe")

Run("Script.exe")
Edited by JustinReno
Link to comment
Share on other sites

I need a script that i will put in my autostart. it has to run a specific .exe and immediately hide it from the taskbar, so people cannot see it (it can appear in taskmanager tho, i dont care about that).

Ill just call that .exe "program1" for now. the thing is, that the program1 will automatically close if program2 is being run.. so it needs to be started again by the script, when program2 is being closed.

oh - thank you, gotcha now :)

well, i worked my own code out and it works like a charm now (might look a bit inconvenient in your eyes but its fine for me)

#NoTrayIcon
ProcessSetPriority ( "script.exe" , 0 )


If ProcessExists ( "program1.exe" ) Then
    ProcessClose ( "program1.exe" )
EndIf

        Sleep (250)
        
Run ("program2.exe" , "" , "@SW_HIDE")
ProcessWait ( "program2.exe" )

If ProcessExists ( "program2.exe" ) Then
ProcessWaitClose ( "program2.exe" )
EndIf

Run ( "script.exe" )

thank u all =]

Well thats not what you said.. Run program1, then when program2 runs program1 automatically closes then when program2 finishes you want to re-run program1

What you wrote is the total reverse of what you asked at the top

Edited by ChrisL
Link to comment
Share on other sites

Well thats not what you said.. Run program1, then when program2 runs program1 automatically closes then when program2 finishes you want to re-run program1

What you wrote is the total reverse of what you asked at the top

its not, i think u just got me wrong - the point is, that program2 automatically closes program1 itself. whatever, it worked now and u guys helped me a lot. didnt do any autoit in ages :}

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...