Jump to content
caramen

[solved]hide taskbar icon

Recommended Posts

caramen

Hello guys :)

 

i ve got problem for executing team speack if my server crash

so i made that little simple script

unfortunatly it is not working

how to execute if processe does not existe "ts3server.exe"

located here "C:\Users\Caramen\Desktop\teamspeak3-server_win64"

here is what i tryed with shellexecute and run

 

Func afk ()

If ProcessExists ("ts3server.exe") Then
   Sleep (1000)
Else

;~    Run("teamspeak3-server_win64.exe","")
Run("ts3server.exe", "C:\Users\Caramen\Desktop\teamspeak3-server_win64\")


EndIf

EndFunc

 

Edited by caramen

IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

Share this post


Link to post
Share on other sites
Subz

Maybe something like:

HotKeySet("{ESC}", "Terminate")

afk()

Func afk ()
    While 1
        If ProcessExists ("ts3server.exe") Then
            Sleep (1000)
        Else
            DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 1) ;~ Turns Off 64 Bit Redirection
                Run(@DesktopDir & "\teamspeak3-server_win64\ts3server.exe")
            DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 0) ;~ Turns Off 64 Bit Redirection
            ProcessWait("ts3server.exe", 5)
        EndIf
    WEnd
EndFunc

Func Terminate()
    Exit
EndFunc   ;==>Terminate

 

Share this post


Link to post
Share on other sites
caramen

arf it was a system bug the script was fine

i just add the script in the team speak folder and now it's working

 

but now i have a second question

I execute also a bat file but the icon is staying in my task bar is there a way to hide it ? i whould like to keep my task bar clean

Edited by caramen

IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

Share this post


Link to post
Share on other sites
caramen

huh ? Where how ? Wait i am watching help fille i dont know that one

 

Edit : Well i am so noob.

i guess i need help on it.

My working code :

Func afk ()

If ProcessExists ("ts3server.exe") Then

   Sleep (1000)
Else

;~    Run("teamspeak3-server_win64.exe","")
ShellExecute (@ScriptDir & "\ts3server.exe")
ShellExecute (@ScriptDir & "\AccountingServerEmulator-Windows.exe",@SW_HIDE)

EndIf

EndFunc

and this is what i've tryed to hide the accounting server emulator

ShellExecute (@ScriptDir & "\AccountingServerEmulator-Windows.exe",@SW_HIDE)

How should i translate that into correct code.

 

 

 

Edited by caramen

IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

Share this post


Link to post
Share on other sites
caramen

I guess it s wrong

if i understand the help file i can just create tray icone and manipulate it and not transform my executable in tray icone

Edited by caramen

IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

Share this post


Link to post
Share on other sites
jdelaney

Just copy the line I gave to the top of your script!  Well, now you need to be more descriptive...you got rid of the loop, so now I don't think you are referring to the autoit tray icon (which the line of script I provided will remove).

 

You need to put the show flag in the 5th parameter...help file is your friend:

ShellExecute ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] )

Or the 3rd parameter in a run:

Run ( "program" [, "workingdir" [, show_flag [, opt_flag]]] )

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
jdelaney

Nope...

Keep it simple:

TraySetState(2) ; this is to remove the AUTOIT tooltray icon
Run("AccountingServerEmulator-Windows.exe",@ScriptDir,@SW_HIDE) ; this creates your process in hidden mode

 

Edited by jdelaney
  • Like 1

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
caramen

Ok we are very close from what i want

 

i dont whant task bar icon but i want keep tray icon

 

you metode work perfectly but i cant shud down the

AccountingServerEmulator-Windows.exe

becose there is no tray icon i whould like to not go in task manager you know ?

Edited by caramen

IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

Share this post


Link to post
Share on other sites
jdelaney

Can't always get what you want.  Create a scheduled task, and run it all in session 0, then you won't need to see anything on your user session.  Don't need to worry about hiding anything either, since it will not interact with your desktop.

Edited by jdelaney
  • Like 1

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
caramen

you're true.

but i attach a very importance to the processor capacity since i am hardcord gamer fps optimiser

 

but well you answered to my question and solved my problem i will end it here

 

1000 Thx man


IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

Share this post


Link to post
Share on other sites
caramen
40 minutes ago, Zedna said:

Look here

 

Thx


IUIAutomation From Junkew WebDriver From Danp2  >>HIt The Thanks Button.<<

 

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

×