Sign in to follow this  
Followers 0
myspacee

Desktop widget anchored on right

1 post in this topic

Hello,
try to build a widget with some tools inside. I want that this GUI is anchored on the right and have as first tool a drag&drop area.

I imagine something like this, without trasparencies and other things  :

Widget-Bar.jpg

replacing clock with a drag&drop area. (exist AI function to enable drag&drop for multiple files ? )

 

thank you fro any examples,

m.

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

    • VIP
      By VIP
      The simple widget shows the percentage of cpu, ram used and the CPU temperature (WMI).
      - Every 30s check, sync and update time for computer.
      - Drag adn Drop any files on GUI for reset Attribute (-RAHS) and set Full Access to Everyone !
      - Righ Click on x and click Un/Install app to boot with Windows!
      CPU_Widget_TimeSync.exe CRC32: 1956339E MD5: BFC2B596BD1EDA35D6B02B97F8FB57AE SHA-1: 796A663739EA5AC9890D9FA324A98E987F35E7C8
      Function code from:
      CPU: 
      RAM:  MemGetStats ( )
      Memory:   _WinAPI_EmptyWorkingSet ()
       
    • Omnitica
      By Omnitica
      Hello!
      I'm new to the forums! Couldn't find any threads covering this issue. Sorry if I'm wrong.

      I'm having problems changing the text/value of a input box. The particular box doesn't have a name or id, just: class="jq_hotkeys_enabled form-control".
      This class appears multiple times throughout the source, so I don't think It's right to reference that object. 
      See image 1.
      However, I've managed to find a object with the name "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper" which contains the value of the input box, and the id for the person in the dropdown/combobox left of it. (with "dummy-1" selected).
      See image 2.
      As you can see the value is 3982,4545     ( name , time )
      But when I try to change the value of it by doing:
      #include <IE.au3> Local $oIE = _IEAttach(WinGetHandle("[CLASS:IEFrame]"),"embedded") Local $oForm = _IEFormGetObjByName($oIE, "aspnetForm") Local $oInput = _IEFormElementGetObjByName($oForm, "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper") _IEFormElementSetValue($oInput, "3982,1337") The box doesn't get its new value. I  can see in the source that it's changed though.
      See image 3.
       
      However, if I do: 
      #include <IE.au3> Local $oIE = _IEAttach(WinGetHandle("[CLASS:IEFrame]"),"embedded") Local $oForm = _IEFormGetObjByName($oIE, "aspnetForm") Local $oInput = _IEFormElementGetObjByName($oForm, "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper") _IEFormElementSetValue($oInput, "3982,1337") $oIE.document.parentwindow.execScript("theForm.submit()") ; But it needs to reload the page The box gets its new value after the page reloads by the theForm.submit() function. 
      This is a bit unfortunate as I want the changes to happen instantly like when I type in the box with the keyboard... or select in the combobox.
      Maybe someone knows how I can do this? Looking forward to an answer! 
      Thanks in advance.
       
      Note: Unfortunately I can't provide with the real URL as it is constricted to employees in the company I work for, but let me know If I should provide anything else.
       



    • Svrij22
      By Svrij22
      Hello Autoit,
      I recently made a cool little program that I wanted to share with you guys. I don't know if any of you has Admob, but if you do, this program automatically logs all your data and estimates how much you will make this day or month.
      Current Features:
      *Writes Log
      *Average per Hour
      *Estimated Month
      *Estimated Day
      Here's how it works: It opens an IE page, then reads all the text and splits it in an array, then filters the numbers and then calculates all the estimations.
       
      I hope some of you will use this
       
      Code:
      #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <Date.au3> #Include <GuiEdit.au3> HotKeySet ("^g", "show") #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Admob Widget", 430, 230, 0, 0) $Label1 = GUICtrlCreateLabel("Today:", 8, 8, 80, 17) $Label2 = GUICtrlCreateLabel("Yesterday", 8, 24, 80, 17) $Label3 = GUICtrlCreateLabel("This Month:", 8, 40, 80, 17) $Label4 = GUICtrlCreateLabel("Previous Month:", 8, 56, 80, 17) $Label4 = GUICtrlCreateLabel("Estimated Today:", 8, 72, 185, 17) $Label4 = GUICtrlCreateLabel("Estimated Month:", 8, 88, 185, 17) $Label4 = GUICtrlCreateLabel("Average/Hour:", 8, 104, 185, 17) $state = GUICtrlCreateLabel("State: Logging In", 8, 194, 185, 17) $sleep = GUICtrlCreateCheckbox("Slow mode", 90, 150, 90, 17) $Label4 = GUICtrlCreateLabel("Graph Height:", 8, 152, 80, 17) $Input1 = GUICtrlCreateInput("100", 8, 168, 121, 21) $Label22 = GUICtrlCreateLabel("v3.8", 140, 174, 121, 21) $Label5 = GUICtrlCreateLabel("???", 112, 8, 100, 17) $Label6 = GUICtrlCreateLabel("???", 112, 24, 100, 17) $Label7 = GUICtrlCreateLabel("???", 112, 40, 100, 17) $Label8 = GUICtrlCreateLabel("???", 112, 56, 100, 15) $Label9 = GUICtrlCreateLabel("???", 112, 72, 100, 15) $Label10 = GUICtrlCreateLabel("???", 112, 88, 100, 15) $Label11 = GUICtrlCreateLabel("???", 112, 104, 100, 15) $SmartAvg = GUICtrlCreateCheckbox("Smart Average", 8, 210, 100, 17) $Button1 = GUICtrlCreateButton("View Log", 8, 120, 75, 25) $Button2 = GUICtrlCreateButton("Hide", 90, 120, 75, 25) $editctrl = GUICtrlCreateEdit("", 185, 8, 240, 215, $ES_AUTOVSCROLL + $ES_AUTOHSCROLL) GUISetState(@sw_SHOW) #EndRegion ### END Koda GUI section ### ;Starting Log $NowTime = string (_NowCalc()) $hFileOpen = FileOpen("Log.txt", $FO_APPEND) FileWrite($hFileOpen,$NowTime & " <--- Started (Widget by Svrij22)--->" & @crlf) $Ai = 0 $Aval = 0 $Avalp = 0 global $log = "" CheckLogin() Refresh() $i=0 $imax = 300 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $sTxtFileDir = @scriptdir & "\Log.txt" Run ( "notepad.exe " & $sTxtFileDir, @windowsdir, @sw_MAXIMIZE ) Case $Button2 MsgBox ("","","Press CTRL-G To show again") GUISetState(@sw_hide) EndSwitch sleep (60) $i+=1 if $i>$imax Then Refresh() $i=0 EndIf GUICtrlSetData ($state, "State: Idle "&$i) if GUICtrlRead($sleep) = $GUI_CHECKED Then $imax = 900 Else $imax = 300 EndIf WEnd func show() GUISetState(@sw_SHOW) EndFunc Func CheckLogin() Local $oIE = _IECreate("apps.admob.com", 0, 0, 0) _IELoadWait($oIE) sleep (4000) Local $sText = _IEBodyReadText($oIE) if StringInStr ($sText,"MONETIZE") Then GUICtrlSetData ($state, "State: Logged In Succesfully") sleep (150) Else MsgBox ("","","Failed to Retrieve Data. Please Login to your Admob account on Internet Explorer") $oIE = _IECreate("apps.admob.com",0,1,1) _IELoadWait($oIE) WinClose($Form1) GUICtrlSetData ($state, "State: Error 403") EndIf EndFunc Func Refresh() GUICtrlSetData ($state, "State: Connecting") Local $oIE = _IECreate("apps.admob.com", 0, 0, 0) _IELoadWait($oIE) sleep (4000) GUICtrlSetData ($state, "State: Getting Data") Local $sText = _IEBodyReadText($oIE) If StringInStr ($sText,"Yesterday") Then ; TEST CONNECTION $sText = StringRegExpReplace($sText, " ", "") $sText = StringRegExpReplace($sText, "[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]", "") $sText = StringRegExpReplace($sText, @crlf, "") $sText = StringRegExpReplace($sText, @cr, "") $sText = StringRegExpReplace($sText, @lf, "") $aSplit = StringSplit($sText, "€") _IEQuit($oIE) ;setdata $sToday = $aSplit[2] $sYes = $aSplit[3] $sTM = $aSplit[4] $sPM = $aSplit[5] $sPM = StringTrimRight ($sPM,29) GUICtrlSetData ($Label5,$sToday&" € Euro") GUICtrlSetData ($Label6,$sYes&" € Euro") GUICtrlSetData ($Label7,$sTM&" € Euro") GUICtrlSetData ($Label8,$sPM&" € Euro") GUICtrlSetData ($state, "State: Getting Date") sleep (150) ;Get Date $sTime2 = string (_NowTime()) $sTime2 = StringTrimRight ($sTime2,3) $sTime2 = StringReplace ($sTime2,":",".") $sTime2 = Number ($sTime2) if $sTime2 > 10 Then $sDate = @mday Else $sDate = @mday-1 EndIf GUICtrlSetData ($state, "State: Calculating Month Estimation") sleep (150) ;Calculate Month Estimation $sAvg = $sTM/$sDate $sAvg = $sAvg*31 $sAvg = Round ($sAvg,2) $sAvg = string ($sAvg) GUICtrlSetData ($Label10,$sAvg&" € Euro") GUICtrlSetData ($state, "State: Writing Ini for GM Graph") sleep (150) ;Write ini for GM Graph $hFileOpen = FileOpen("graph.txt", 2) FileWrite($hFileOpen,"[graph]" & @crlf) FileWrite($hFileOpen,"val="&$sToday& @crlf) FileWrite($hFileOpen,"hei="& GUICtrlRead ($Input1) & @crlf) FileWrite($hFileOpen,'date="'& string (_NowTime()) &'"'& @crlf) GUICtrlSetData ($state, "State: Calculating Time") sleep (150) ;Calculate Time again?? $sTime = string (_NowTime()) $sTime = StringTrimRight ($sTime,3) $sTime = StringReplace ($sTime,":",".") $sTime = Number ($sTime) if $sTime > 10 Then $sTime -= 10 Else $sTime += 14 EndIf GUICtrlSetData ($state, "State: Calculating Average/Hour") sleep (150) ;Calculate Average/Hour $sAvgT = $sToday/$sTime $sAvgT = round ($sAvgT,2) GUICtrlSetData ($Label11,$sAvgT&" € Euro") GUICtrlSetData ($state, "State: Calculating Hours Passed") sleep (150) ;Calculate hours passed $sTime = string (_NowTime()) $sTime = StringTrimRight ($sTime,3) $sTime = StringReplace ($sTime,":",".") $sTime = Number ($sTime) if $sTime > 10 Then $sTime -= 10 Else $sTime += 14 EndIf GUICtrlSetData ($state, "State: Calculating Day Estimation") sleep (150) ;Calculate Daily $sToday = Number ($sToday) $sEsti = ($sToday/$sTime)*24 $sEsti = round($sEsti,2) GUICtrlSetData ($Label9,"~"+string($sEsti)&" € Euro") $NowTime = string (_NowCalc()) $NowTime = string (_NowCalc()) GUICtrlSetData ($state, "State: Calculating Smart Average") sleep (150) ;SmartAvg Begin GUICtrlSetData ($state, "State: Calculating Smart Average") sleep (600) if GUICtrlRead($SmartAvg) = $GUI_CHECKED Then $Aval += $sEsti $Ai+=1 $Avalp = ($Aval/$Ai)*0.85 $sEsti = $Avalp GUICtrlSetData ($Label9,$Avalp&" € Euro") EndIf ;SmartAvg End GUICtrlSetData ($state, "State: Writing Log") sleep (150) ;Write Log $hFileOpen = FileOpen("Log.txt", $FO_APPEND) FileWrite($hFileOpen,$NowTime & " Earnings: " & $sToday & " Avg/Hour: " & $sAvgT & " Estimated Earnings: Today: " & $sEsti & " This month:" & $sAvg & @crlf) GUICtrlSetData ($state, "State: Calculating GUI Log") sleep (150) ;Calc gui log $log=$log & string (_NowTime()) & " E: " & $sToday & " A/H: " & $sAvgT & " ET: " & $sEsti & @CRLF GUICtrlDelete ($editctrl) $editctrl = GUICtrlCreateEdit("", 185, 8, 240, 215, $ES_AUTOVSCROLL + $ES_AUTOHSCROLL) _GUICtrlEdit_InsertText($editctrl,$log) GUICtrlSetData ($state, "State: Closing IE") sleep (150) ;Close IE ProcessClose ("iexplore.exe") ProcessClose ("iexplore.exe") Else GUICtrlSetData ($state, "State: Failed to Retrieve Data") EndIf GUICtrlSetData ($state, "State: Cleaning") sleep (500) GUICtrlSetData ($state, "State: Idle") EndFunc (Sorry if my code isn't so advanced and crappy)
    • marcoauto
      By marcoauto
      Ciao,
      I'm trying to filter a draggable Listview using checkbox, but when I filter a listview (idListiview) and I drag and drop a record to another listview, the listview that i filtered returns not filtered and the record that i would drag and drop is not the correct one
      There are 4 listview, LISTVIEWL1, LISTVIEWL2, LISTVIEWL3 and LISTVIEW. The filter must be work for LISTVIEW (and they work)
      Where I wrong?
      This is my script (Is not complete, but I rewrite it for the forum)
      I know that is not an optimized script...
       
      Thanks and sorry for my bad english
       
      Marco
       
      #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <GUIListView.au3> #include <EditConstants.au3> #include "GUIListViewEx.au3" #include <ButtonConstants.au3> #include <StaticConstants.au3> #include "_FileListToArrayEx_Marco.au3" #include <Array.au3> ; ******************************************************************************************************* ; **************************** LETTURA FILE CODICI DALLE CARTELLE *************************************** ; ******************************************************************************************************* ;~ $listaTotaleCodici = _FileListToArrayEx ("images", "*.png", 4);1+4); 1+4+128) ;<== original dim $listaTotaleCodici[11] $listaTotaleCodici[0] = 10 $listaTotaleCodici[1] = "01A_COD1_Tipo1_CHECK2_01_123456789_02_.png" $listaTotaleCodici[2] = "01A_COD2_Tipo1_CHECK3_02_321456789_01_.png" $listaTotaleCodici[3] = "02A_COD1_Tipo1_CHECK2_01_231456798_02_.png" $listaTotaleCodici[4] = "03A_COD1_Tipo2_CHECK1_01_888456789_01_.png" $listaTotaleCodici[5] = "04A_COD2_Tipo2_CHECK1_01_111456789_02_.png" $listaTotaleCodici[6] = "05A_COD1_Tipo1_CHECK2_01_777456789_02_.png" $listaTotaleCodici[7] = "05A_COD1_Tipo3_CHECK1_01_666456789_01_.png" $listaTotaleCodici[8] = "06A_COD1_Tipo1_CHECK2_01_555456789_02_.png" $listaTotaleCodici[9] = "07A_COD1_Tipo3_CHECK2_01_444456789_01_.png" $listaTotaleCodici[10] = "08A_COD1_Tipo1_CHECK2_01_666777789_02_.png" ;~ $listaTotaleCodici[11] = "08A_COD2_Tipo1_CHECK3_01_222456789_02_.png" ; read some png files ; Ex: ; 01A_COD_Tipo1_CHECK2_N_NUMBER_XY.png ; 02A_COD_Tipo1_CHECK2_N_NUMBER_XY.png ; 03A_COD_Tipo3_CHECK1_N_NUMBER_XY.png ; where NUMBER is differentfor any png files ; COD has max 2 values (COD1 or COD2) ; Tipo has max 3 values ; ******************************************************************************************************* ; ********************************* DICHIARAZIONI VARIABILI ********************************************* ; ******************************************************************************************************* dim $aArray[8] dim $filtrare[13] ;array dove vengono memorizzate le parole da filtrare (899, 01, webcom, ecc ecc) Global $fatto = 0 Global $iLV_L1,$iLV_L2,$iLV_L3,$iLV_Codici Dim $idItem[800] Dim $idItemL1[3] Dim $idItemL2[3] Dim $idItemL3[3] Global $idListviewL1, $idListviewL2, $idListviewL3, $idListview $x = 120 $y = 96 $offsetxpreview = 24+100 $offsetypreview = 129+96 $offsetx = $offsetxpreview + $x + 24 $offsety = 12 Global $offsetxradio = 345 Global $aList1, $tmp_String Dim $TotaleCodici[800] Dim $aTempArray[800] Dim $idButton[6] Global $offsetxbutton = 20 Global $offsetybutton = 45 Global $idx=0 Global $b = 0 Global $filtrato = 0 ; ******************************************************************************************************* ; **************************************** PARTENZA GDI ************************************************* ; ******************************************************************************************************* _GDIPlus_Startup() ;~ GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; ******************************************************************************************************* ; *********************************** CREAZIONE GUI PRINCIPALE ****************************************** ; ******************************************************************************************************* $g_hGUI = GUICreate("GUI", 1038, 700, 192, 124) GUISetState() Global $Graphic = _GDIPlus_GraphicsCreateFromHWND($g_hGUI) ; ******************************************************************************************************* ; **************************************** CREAZIONE CHECKBOX ****************************************** ; ******************************************************************************************************* GUIStartGroup() $RadioCodice1 = GUICtrlCreateCheckbox("CHECK1", $offsetxradio+112, 10, 100, 17) GUICtrlSetState($RadioCodice1, $GUI_CHECKED) $RadioCodice2 = GUICtrlCreateCheckbox("CHECK2", $offsetxradio+227, 10, 100, 17) GUICtrlSetState($RadioCodice2, $GUI_CHECKED) $RadioCodice3 = GUICtrlCreateCheckbox("CHECK3", $offsetxradio+341, 10, 100, 17) GUICtrlSetState($RadioCodice3, $GUI_CHECKED) $Label1 = GUICtrlCreateLabel("LABEL:", $offsetxradio + 24 + 35, 10+2, 50, 17) $RadioTipo1 = GUICtrlCreateCheckbox("Tipo1", $offsetxradio+112, 45, 100, 17) GUICtrlSetState($RadioTipo1, $GUI_CHECKED) $RadioTipo2 = GUICtrlCreateCheckbox("Tipo2", $offsetxradio+227, 45, 100, 17) GUICtrlSetState($RadioTipo2, $GUI_CHECKED) $RadioTipo3 = GUICtrlCreateCheckbox("Tipo3", $offsetxradio+341, 45, 100, 17) GUICtrlSetState($RadioTipo3, $GUI_CHECKED) $LabelTipo = GUICtrlCreateLabel("TIPO:", $offsetxradio + 24 + 35, 45+2, 50, 17) Global $offsetxradio = 345 ;~ GUIStartGroup() $Radio1 = GUICtrlCreateCheckbox("A", $offsetxradio+112, 80, 50, 17) ;~ Local $idCheckbox = GUICtrlCreateCheckbox("Standard Checkbox", 10, 10, 185, 25) GUICtrlSetState($Radio1, $GUI_CHECKED) $Radio2 = GUICtrlCreateCheckbox("B", $offsetxradio+169, 80, 50, 17) GUICtrlSetState($Radio2, $GUI_CHECKED) $Radio3 = GUICtrlCreateCheckbox("C", $offsetxradio+227, 80, 50, 17) GUICtrlSetState($Radio3, $GUI_CHECKED) $Radio4 = GUICtrlCreateCheckbox("D", $offsetxradio+284, 80, 50, 17) GUICtrlSetState($Radio4, $GUI_CHECKED) $Radio5 = GUICtrlCreateCheckbox("E", $offsetxradio+341, 80, 50, 17) GUICtrlSetState($Radio5, $GUI_CHECKED) $Radio6 = GUICtrlCreateCheckbox("F", $offsetxradio+399, 80, 50, 17) GUICtrlSetState($Radio6, $GUI_CHECKED) $Radio7 = GUICtrlCreateCheckbox("ALL", $offsetxradio+456, 80, 50, 17) GUICtrlSetState($Radio7, $GUI_CHECKED) $LabelGruppi = GUICtrlCreateLabel("LABEL:", $offsetxradio + 24 + 35, 80+2, 50, 17) $ButtonFiltra = GUICtrlCreateButton("Filter", 870, 12, 150, 84) ;~ GUICtrlSetBkColor(-1,0x00FF00 $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Graphic) $hPen = _GDIPlus_PenCreate(0xff000000, 2);red, 3pixels wide ; ******************************************************************************************************* ; **************************************** CREAZIONE BOTTONI ******************************************* ; ******************************************************************************************************* $cDelete_Button = GUICtrlCreateButton("Delete Line", 870, 115, 150, 30) $idListviewL1 = GUICtrlCreateListView("LISTVIEWL1", 400, 6+96, 450, 96) _GUICtrlListView_SetColumnWidth($idListviewL1, 0, 446) $idListviewL2 = GUICtrlCreateListView("LISTVIEWL2", 400, 6+96+96, 450, 96) _GUICtrlListView_SetColumnWidth($idListviewL2, 0, 446) $idListviewL3 = GUICtrlCreateListView("LISTVIEWL3", 400, 6+96+96+96, 450, 96) _GUICtrlListView_SetColumnWidth($idListviewL3, 0, 446) $idListview = GUICtrlCreateListView("LISTVIEW", 400, 6+96+96+96+96, 450, 573-96-96-96) _GUICtrlListView_SetColumnWidth($idListview, 0, 446) if $fatto = 0 Then ConsoleWrite("fatto = 0" & @CRLF) For $i = 1 To $listaTotaleCodici[0] ; Loop through the array to display the individual values. local $aArray = StringSplit($listaTotaleCodici[$i], '_');, $STR_ENTIRESPLIT) ; Pass the variable to StringSplit and using the delimiter "\n". Local $aList[$listaTotaleCodici[0]+1], $sText If IsArray($aArray) Then $sText = $aArray[1] & " " & $aArray[2] & " " & $aArray[3] & " " & $aArray[4] & " " & $aArray[6] $aList[$i] = $sText GUICtrlCreateListViewItem($sText, $idListview) EndIf Next $iLV_Codici = _GUIListViewEx_Init($idListview, $aList, 0, 0, True, 128 + 256) $TotaleEtichetteCodici = _GUIListViewEx_ReadToArray($idListview) $fatto = 1 EndIf $iLV_L1 = _GUIListViewEx_Init($idListviewL1, $idItemL1, 0, 0, True) ; No external drop, will drag to others - items deleted on drag $iLV_L2 = _GUIListViewEx_Init($idListviewL2, $idItemL2, 0, 0, True) ; No external drop, will drag to others - items deleted on drag $iLV_L3 = _GUIListViewEx_Init($idListviewL3, $idItemL3, 0, 0, True) ; No external drop, will drag to others - items deleted on drag ;~ $iLV_Codici = _GUIListViewEx_Init($idListview, $idItem, 0, 0, True, 128 + 256) ; No external drop, will drag to others - items NOT deleted on drag ;~ GUISetState() _GUIListViewEx_MsgRegister() _GUICtrlListView_SetColumnWidth($idListview, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($idListview, 1, 1) ; <<<<<<<<<<<<<<<<<<<<<<<<<< GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; ******************************************************************************************************* ; ********************************************* MAIN LOOP *********************************************** ; ******************************************************************************************************* Global $idMsg ;~ ; Loop until the user exits. While 1 Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $cDelete_Button $listaTotaleCodiciaAttiva = _GUIListViewEx_GetActive() ConsoleWrite(" active = " & $listaTotaleCodiciaAttiva & @CRLF) if $listaTotaleCodiciaAttiva <> 1 Then _GUIListViewEx_Delete() EndIf Case $ButtonFiltra _filtraCodici() EndSwitch WEnd ; Clean up resources _GDIPlus_GraphicsDispose($Graphic) _GDIPlus_Shutdown() ; ******************************************************************************************************* ; ***************************************** QUIT FUNCTION *********************************************** ; ******************************************************************************************************* Func Quit() _GDIPlus_Shutdown() Exit EndFunc ; ******************************************************************************************************* ; **************************************** ISCHECKED FUNCTION ******************************************* ; ******************************************************************************************************* Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked ; ******************************************************************************************************* ; ************************************ WM_NOTIFY FUNCTION *********************************************** ; ******************************************************************************************************* Func WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam) _GUIListViewEx_WM_NOTIFY_Handler($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $index $tStruct = DllStructCreate("hwnd;uint_ptr;int_ptr;int;int", $lParam) $hWndFrom = DllStructGetData($tStruct, 1) $idFrom = DllStructGetData($tStruct, 2) $code = DllStructGetData($tStruct, 3) $index = DllStructGetData($tStruct, 4) $hWndListView1 = GUICtrlGetHandle($iLV_L1) ;($idListviewL1) $hWndListView2 = GUICtrlGetHandle($iLV_L2) ;($idListviewL2) $hWndListView3 = GUICtrlGetHandle($iLV_L3) ;($idListviewL3) $hWndListViewCodici = GUICtrlGetHandle($iLV_Codici) ;($idListview) Switch $code Case $NM_CLICK ;Left Mouse Button ConsoleWrite("left mouse button") Switch $idFrom Case $iLV_L1 $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) ;~ ConsoleWrite("+Click: " & $index & @CRLF) $text = _GUICtrlListView_GetItemText($iLV_L1, DllStructGetData($tInfo, "Index")) ConsoleWrite("+text: " & $text & @CRLF) EndSwitch Case $NM_DBLCLK ;Double Left Mouse Button Switch $idFrom Case $idListviewL1 $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) ;~ ConsoleWrite("+Click: " & $index & @CRLF) $text = _GUICtrlListView_GetItemText($idListviewL1, DllStructGetData($tInfo, "Index")) ConsoleWrite("+textDBClick: " & $text & @CRLF) Case $idListview $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) ;~ ConsoleWrite("+Click: " & $index & @CRLF) $text = _GUICtrlListView_GetItemText($idListview, DllStructGetData($tInfo, "Index")) ConsoleWrite("+textDBClick: " & $text & @CRLF) EndSwitch Case $GUI_EVENT_CLOSE Quit() EndSwitch EndFunc ;==>WM_NOTIFY ; ******************************************************************************************************* ; ***************************************** FILTRA CODICI *********************************************** ; ******************************************************************************************************* Func _filtraCodici() $aTempArray = $TotaleEtichetteCodici ;$listaTotaleCodici Local $filtrato = 0 If _IsChecked($Radio1) Then $filtrare[1] = 1 Else $filtrare[1] = "A" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = StringLeft($aTempArray[$b][0],3) If StringInStr($tmp_String,$filtrare[1]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($Radio2) Then $filtrare[2] = 1 Else $filtrare[2] = "B" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = StringLeft($aTempArray[$b][0],3) If StringInStr($tmp_String,$filtrare[2]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($Radio3) Then $filtrare[3] = 1 Else $filtrare[3] = "C" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = StringLeft($aTempArray[$b][0],3) If StringInStr($tmp_String,$filtrare[3]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($Radio4) Then $filtrare[4] = 1 Else $filtrare[4] = "D" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = StringLeft($aTempArray[$b][0],3) If StringInStr($tmp_String,$filtrare[4]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($Radio5) Then $filtrare[5] = 1 Else $filtrare[5] = "E" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = StringLeft($aTempArray[$b][0],3) If StringInStr($tmp_String,$filtrare[5]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($Radio6) Then $filtrare[6] = 1 Else $filtrare[6] = "F" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = StringLeft($aTempArray[$b][0],3) If StringInStr($tmp_String,$filtrare[6]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($RadioTipo1) Then $filtrare[7] = 1 Else $filtrare[7] = "Tipo1" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = $aTempArray[$b][0] If StringInStr($tmp_String,$filtrare[7]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($RadioTipo2) Then $filtrare[8] = 1 Else $filtrare[8] = "Tipo2" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 $tmp_String = $aTempArray[$b][0] If StringInStr($tmp_String,$filtrare[8]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($RadioTipo3) Then $filtrare[9] = 1 Else $filtrare[9] = "Tipo3" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 $tmp_String = $aTempArray[$b][0] If StringInStr($tmp_String,$filtrare[9]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($RadioCodice1) Then $filtrare[10] = 1 Else $filtrare[10] = "CHECK1" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = $aTempArray[$b][0] If StringInStr($tmp_String,$filtrare[10]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($RadioCodice2) Then $filtrare[11] = 1 Else $filtrare[11] = "CHECK2" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = $aTempArray[$b][0] ;~ ConsoleWrite(@CRLF & "$tmp_Stringgg= " & $tmp_String & @CRLF) If StringInStr($tmp_String,$filtrare[11]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf If _IsChecked($RadioCodice3) Then $filtrare[12] = 1 Else $filtrare[12] = "CHECK3" $filtrato = 1 For $b=UBound($aTempArray) -1 to 0 step -1 Global $tmp_String = $aTempArray[$b][0] ;~ ConsoleWrite(@CRLF & "$tmp_Stringgg= " & $tmp_String & @CRLF) If StringInStr($tmp_String,$filtrare[12]) Then _ArrayDelete($aTempArray, $b) EndIf Next EndIf _ArrayDisplay($aTempArray,"fine ciclo") _GUICtrlListView_DeleteAllItems($idListview) ;~ $iLV_Codici = _GUIListViewEx_Close($idListview) ConsoleWrite("_GUICtrlListView_DeleteAllItems" & @CRLF) IF $filtrato = 0 Then For $a=0 to UBound($TotaleEtichetteCodici)-1 ; Loop through the array to display the individual values. Local $aList1[UBound($TotaleEtichetteCodici)], $sText If IsArray($TotaleEtichetteCodici) Then $sText = $TotaleEtichetteCodici[$a][0] ConsoleWrite("sText non filtrato = " & $sText & @CRLF) $aList1[$a] = $sText GUICtrlCreateListViewItem($sText, $idListview) EndIf Next EndIf if $filtrato = 1 Then For $a=0 to UBound($aTempArray)-1 ; Loop through the array to display the individual values. Global $aList1[UBound($aTempArray)], $sText If IsArray($aTempArray) Then $sText = $aTempArray[$a][0] ConsoleWrite("sText = " & $sText & @CRLF) $aList1[$a] = $sText GUICtrlCreateListViewItem($sText, $idListview) EndIf Next EndIf $iLV_Codici = _GUIListViewEx_Close($idListview) $iLV_Codici = _GUIListViewEx_Init($idListview, $aList1, 0, 0, True, 128 + 256); 0, 0, True, 1 + 2 + 8, "0;2") EndFunc ;==>_filtraCodici
    • UEZ
      By UEZ
      is a small tool in widget style to show the clock, current cpu usage, cpu speed,
      memory usage and network activity (tcp, ip and udp). Additionally you can use it as an alarm clock (to stop
      alarm clock tone press the left LED (mail) or wait 60 seconds).

      The current cpu usage code is beta and might be not working for some CPU models! Autoit SysInfo Clock should
      work with all operating systems beginning from Windows XP.

      Br,
      UEZ


      This project is discontinued!