Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/08/2014 in all areas

  1. Somehow parts of your code look familiar to me.... Br, UEZ
    1 point
  2. Hi AutID if you want to discover all devices in your local LAN, then you could use my multiping udf (https://www.autoitscript.com/forum/topic/156395-versatile-multi-ping) here a simple example of use that will scann all IP devices of your local subnet and will display result by green boxes in a listview. then will continuosly ping those devices showing a red box when one of them will go offline. (You need first to download the MultiPing.au3 and save it in the same directory of this example.) ; this is to ping continuously a list of IP addresses, get and display ping result "live" ; it simulates the dos "ping -t" command but performed simultaneously on many IP ; presenting the results in a ListView highlighting not responding devices with a red box #include <GUIConstantsEx.au3> #include <Array.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <ListviewConstants.au3> #include 'MultiPing.au3' ; <-- take this from the following link: ; http://www.autoitscript.com/forum/topic/156395-versatile-multi-ping Local $IP_range = "" ; range to be pinged (leave it empty to ping all local lan) Local $IP_mask = "" Opt("GUIOnEventMode", 1) HotKeySet("{esc}", "_button1") Local $Win_X = 600, $Win_Y = 600 ; dimension of window $PingGui = GUICreate("IP addresses monitor", $Win_X, $Win_Y, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_button1", $PingGui) $listview = GUICtrlCreateListView("", 10, 10, $Win_X - 20, $Win_Y - 40) GUICtrlSetFont(-1, 6) GUICtrlSetStyle($listview, $LVS_ICON + $LVS_NOLABELWRAP) ; Generate colored square images $hImage = _GUIImageList_Create(16, 16) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0xFFFF00, 16, 16)) ; yellow _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0xFF0000, 16, 16)) ; red _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0x00FF00, 16, 16)) ; green _GUICtrlListView_SetImageList($listview, $hImage, 0) $button1 = GUICtrlCreateButton("Exit", 10, $Win_Y - 25, $Win_X - 20, 20) GUICtrlSetTip(-1, "End of program") GUICtrlSetOnEvent(-1, "_button1") GUISetState(@SW_SHOW) $MyArray = _nPing($IP_range, $IP_mask, 1, 1) ; first call is to generate the array ; this will search for all active IP devices ; and make a "snapshot" in the $MyArrat _ArrayDelete($MyArray, 0) ; remove first item ; _ArrayDisplay($MyArray) _GUICtrlListView_BeginUpdate($listview) _GUICtrlListView_AddArray($listview, $MyArray) ; and fill ListView _GUICtrlListView_EndUpdate($listview) While 1 ; continuously ping addresses of the snapshot previously generated Sleep(10) _nPing($MyArray, 0, 0, 0, "_refresh") ; PING required addresses and call the _refresh() function ; for each terminated ping (reasults of ping are passed to function) WEnd Func _button1() ; Button 1 clicked Exit EndFunc ;==>_button1 Func _refresh($Params) ; this receive ping results and displays them in the ListView _GUICtrlListView_SetItemImage($listview, $Params[5], 0) ; set colour to Yellow Sleep(50) ; a little wait If $Params[4] = -1 Then ; Device not responding to ping _GUICtrlListView_SetItemImage($listview, $Params[5], 1) ; set colour to RED _GUICtrlListView_EnsureVisible($listview, $Params[5]) ; Position view to this item Else ; Device responds to ping _GUICtrlListView_SetItemImage($listview, $Params[5], 2) ; set colour to GREEN EndIf EndFunc ;==>_refresh
    1 point
  3. DllCallbackRegister should look like this: Local $hHandle = DllCallbackRegister("_lpvNotifier","none","UINT;DWORD;DWORD") look the dllcallbackregister help. Create the _lpvNotifier Functions, and look if it's working all right. Be carefull in dllcall it's dword not doword. Saludos
    1 point
  4. Well, your loop only exits if it finds the image... Doubt reinstalling will fix anything. What you need to do is add some debugging to find out what is going wrong. Is both the dll and your image file in the same folder as your script? You can use ConsoleWrite("Insert some debug text" & @CRLF) in strategic places to help you figure it out.
    1 point
  5. Have you tried FileCreateShortcut? You can call it whatever you want with it.
    1 point
  6. Hot-tracking in a menu bar means that the (drop down) menu items are shown automatically, when the mouse cursor hovers over the top menu item, without the need to click it. This is the case for an ordinary menu, but not for a toolbar menu. To implement that functionality for a toolbar menu, you have to code it yourself. These examples implements that functionality. The toolbar menu can be custom drawn, to look like an ordinary menu. You have to click a top menu item once, to open the first drop down menu. The toolbar can contain other controls in addition to the menu. And it can be used in a rebar. When the window is resized, the arrows and menu are aligned to the left border. The search box and icon are aligned to the right border. This means, that it's the gap between the two parts of the rebar, that is resized. The first version of the examples was created autumn 2013 with AutoIt 3.3.8. These examples are not running under 3.3.10. This is an update for 3.3.10. Update 2014-05-04: AutoIt 3.3.10 All the examples in this update are based on a rebar. The code is optimized, and there are several bug fixes. This is a list of the examples: ToolbarReBar1.au3 - just a toolbar menu and a search box ToolbarReBar2.au3 - the example in the picture ToolbarReBar3.au3 - the right arrow is moved to the right side of the menu ToolbarReBar4.au3 - the top menu items (not custom drawn) are provided with an icon ToolbarReBar5.au3 - same as 4 but the top menu items are custom drawn ToolbarReBar6.au3 - the top menu buttons are split buttons ToolbarReBar7.au3 - added 4 buttons on the right side of the menu ToolbarReBar8.au3 - same as 7 but the 4 buttons can be replaced dynamically ToolbarReBar9.au3 - the drop down menus are replaced with custom controls The buttons in a toolbar are often used to open a drop down menu. Example 9 shows how the buttons can be used to open various controls. The buttons are still hot-track enabled. This is a picture of example 9: HotToolbar3.3.10.7z Testet on XP 32 bit and Win 7 32/64 bit. First version october 2013: AutoIt 3.3.8
    1 point
×
×
  • Create New...