Didonet Posted September 8, 2007 Share Posted September 8, 2007 is it possible to create a network status on the taskbar? Like in windows.Example: Link to comment Share on other sites More sharing options...
Zedna Posted September 8, 2007 Share Posted September 8, 2007 is it possible to create a network status on the taskbar? Like in windows.Example: Yes this is possible.For tray icon see TraySetIcon() in helpfile.and add your network logic. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Didonet Posted September 8, 2007 Author Share Posted September 8, 2007 Yes this is possible.For tray icon see TraySetIcon() in helpfile.and add your network logic.And how to get my network logic? Link to comment Share on other sites More sharing options...
Didonet Posted September 10, 2007 Author Share Posted September 10, 2007 Is it possible to get that "network logic" or somehow to get the status of the network or to forget this way? Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 10, 2007 Share Posted September 10, 2007 HI, Func isOnline() If Ping("www.google.de") > 0 Then MsgBox(64, "Internet connection active!", "You internet connection is enabled...") Else MsgBox(16, "Internet connection failure!", "You internet connection is disabled...") EndIf EndFunc ;==>isOnline Func _checkINet() $IsCon = DllCall("WinInet.dll", "int", "InternetGetConnectedState", "int_ptr", 0, "int", 0) If $IsCon[0] = 0 Then MsgBox(0, "NO CONNECTION", "Please Connect To The Internet Before Continuing") Else MsgBox(0, "CONNECTION", "Online") EndIf EndFunc ;==>_checkINet So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Didonet Posted September 10, 2007 Author Share Posted September 10, 2007 thanks for the script, but how about outgoing traffic and incoming... and when they are connected? Or this is impossible? Link to comment Share on other sites More sharing options...
weaponx Posted September 10, 2007 Share Posted September 10, 2007 (edited) Why aren't you just showing the local area connection icon on the taskbar? Edited September 10, 2007 by weaponx Link to comment Share on other sites More sharing options...
Didonet Posted September 10, 2007 Author Share Posted September 10, 2007 Why aren't you just showing the local area connection icon on the taskbar?because i write a program to connect to the i-net.my i-net provider use a web page to submit user/pass and then to start the internet. if i do not login i don't have i-net I want to create a program to get the status of the network... Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 10, 2007 Share Posted September 10, 2007 Hi, what info do you miss? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Didonet Posted September 10, 2007 Author Share Posted September 10, 2007 Hi I think this script didn't log outgoing and incoming traffic... it just says "connected" or not.. Link to comment Share on other sites More sharing options...
Didonet Posted September 10, 2007 Author Share Posted September 10, 2007 Link to comment Share on other sites More sharing options...
weaponx Posted September 10, 2007 Share Posted September 10, 2007 If you need the icon in the taskbar to reflect network activity you need to use Windows builtin tray icon. Right Click My Network Places > Click Properties Right Click Local Area Connection > Click Properties Check the box labeled > Show icon in notification area when connected Click OK Any other way would be silly. If you only need to show an icon reflecting the "Network Status" and you don't want to use the above method you can try this: #Include TraySetState() $dropped = true While 1 isOnline() Sleep(1000) WEnd Func isOnline() If Ping("www.google.com") > 0 Then TraySetIcon ("netshell_193.ico") If $dropped Then TrayTip ( "", "Connection established", 4, 1) $dropped = False EndIf Else TrayTip ( "Warning", "Connection lost", 4, 2) TraySetIcon ("netshell_195.ico") $dropped = true EndIf Required icons: netshell_195.ico netshell_193.ico Link to comment Share on other sites More sharing options...
Didonet Posted September 11, 2007 Author Share Posted September 11, 2007 How about netshell_191 and netshell_192? Is it possible to stat them? Or there's no way? And how can i put this resources (netshell_195 and netshell_193) into the .exe? Link to comment Share on other sites More sharing options...
ValeryVal Posted September 11, 2007 Share Posted September 11, 2007 Try it #Include <Constants.au3> #NoTrayIcon Global $Start, $FromTo Global $YourURL = 'www.ya.ru' Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown. $Exit = TrayCreateItem("Exit") TraySetState() $Start = TimerInit() While 1 $msg = TrayGetMsg() If $msg = $Exit Then ExitLoop If TimerDiff($Start) > 1000 Then IsOn() WEnd Exit func IsOn() If Ping($YourURL) > 0 then TraySetIcon ("netshell.dll", 59) Sleep(1000) TraySetIcon ("netshell.dll", 60) Sleep(1000) TraySetIcon ("netshell.dll", 61) else TraySetIcon ("netshell.dll", 62) endif $Start = TimerInit() endfunc I prefer use $YourURL = 'www.ya.ru' but you can set your favorite one. The point of world view Link to comment Share on other sites More sharing options...
Didonet Posted September 11, 2007 Author Share Posted September 11, 2007 No, no... i want a real statistic.. not to wait 1sec and show the next icon Link to comment Share on other sites More sharing options...
ValeryVal Posted September 11, 2007 Share Posted September 11, 2007 Then you have to read aboutHow to capture network traffic with Network Monitorhere The point of world view Link to comment Share on other sites More sharing options...
Didonet Posted September 11, 2007 Author Share Posted September 11, 2007 OK, i'll use only 2 icons for online or offline... i can't get the way to "capture the traffic with network monitor" And.. can i put the two icons into the exe? As resources? Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 11, 2007 Share Posted September 11, 2007 I've been trying to do a few things with resources myself and I don't think autoit supports them. Try using FileInstall, it should work just as well if you put the icons in the temp dir. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Danny35d Posted September 11, 2007 Share Posted September 11, 2007 You will need to download and install SciTe. After you install SciTe open the help file scroll down to Extra Utilities and look for AutoIt3Wrapper. That will give you all the information you need to add icons to the EXE.;Add extra ICO files to the resources which can be used with TraySetIcon(@ScriptFullPath, 3) etc; list of filename of the Ico files to be added, First one will have number 3, then 4 ..etc#AutoIt3Wrapper_Res_Icon_Add= ; Filename of ICO to be added.#AutoIt3Wrapper_Res_Icon_Add= ; Filename of ICO to be added. #AutoIt3Wrapper_Res_File_Add= ; Filename[,Section [,ResName]] to be added.#AutoIt3Wrapper_Res_File_Add= ; Filename[,Section [,ResName]] to be added. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Didonet Posted September 11, 2007 Author Share Posted September 11, 2007 Thanks, but... i cannot get the resources. i put the reshack.exe to the AutoIt3Wrapper subdirectory and i compile.. in reshack the resources are there, but if i cannot get them with this script expandcollapse popup#AutoIt3Wrapper_Res_Icon_Add=netshell_193.ico #AutoIt3Wrapper_Res_Icon_Add=netshell_195.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 1 To 8 $rc = TraySetIcon(@ScriptFullPath, $x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, $x) If $x < 3 Then TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Else TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) EndIf Sleep(2000) Next GUIDelete() Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now