Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/15/2017 in all areas

  1. nend

    Tray Radio

    Tray Radio is a radio portal software. For the first years it was for the Netherlands but the last years the are diffent translation and station. On setup you can install it in Dutch or English and on the forum http://trayradio.com/forum/viewforum.php?f=10&sid=7929c895bdc088fc378347ce2eefb57d You can find diffent language files Besides it it plays radio station it also playes mp3, wma and m4a files. Tray Radio start up as a icon in the systray. Clicking with the right mouse button it shows the menus. Clicking with the left mouse button it gives a window with some controls. Almost every function you can control with hotkeys (wich you can set on every key on your keyboard). Tray Radio also has it’s own lyric database and coverart database (it’s online) Tray Radio has a Shoutcast interface to find over more than 50000 online stations. Tray Radio use Stream Packets, Stream Packet are a list with stations in it. You can import the list in the Stream Packet interface. Tray Radio has a infobar, this wil display now playing information on the taskbar next to systray. The Infobar will only work if the Windows Taskbar is down on the screen. Tray Radio has a fullscreen option where you can see the lyrics, cover arts and controls. Tray Radio has a lot more option (to much to write them down). You can download the setup here Tray Radio Setup.zip There is no source code. This program uses Bass.dll for the audio engine the rest is all made in AutoIT. I hope you guys like it. Please let me know what you think of it.
    1 point
  2. nend

    Tray Radio

    Thanks argumentum for your reply. Could you add this "stand by" mode to your tray icon showing only "stand by off" & "Exit" ?. I don't have a clue what you meant to this? Also, can you make a sharable link to the station I'm listening to ? to share with others ? ( by means of clipboard and/or file )(maybe a "magnet:" like but "tinyRadio:" I guess ). I Wil look if this is possible, mabey in a next update You can always make a Stream Packet from the stations you wish to share with others. There is a Stream Packet maker in the program. The "Automatic startup with windows" does not show a "do not startup with windows". You can uncecked it and it won't start anymore with Windows , so uncheck both the options.
    1 point
  3. I compared your code above with my friends output and it appears to be the same for her account as well. I put a ConsoleWrite($oButton.GetAttribute('autoid') & @CRLF) within the first loop and it only showed one autoid with_ho2_0. Also if you just use _IECreate by itself, it will always try to create a new instance of IE, I used _IEAttach so that it attached to any Window that is open with the url https://outlook.office.com/owa/.
    1 point
  4. monitor timeout still working well so i guess that problem is fixed .. thanks Careca for the Help. i did have to reinstall that computer the windows 10 updates was missing stuff from all over the place.. I have not had any windows 10 computers to test out weather shutdown(6) will update and restart.. If it does not i guess setting schedule them some how and restarting would
    1 point
  5. you can use GetAttribute for aria-label however this changes for example if the user is away it will have a different message, below is what I used to click the buttons, please note you may need to change url to office365.com. #include <IE.au3> Local $oButtons, $oIE $oIE = _IEAttach('https://outlook.office.com/owa/', 'url') $oButtons = _IETagNameGetCollection($oIE, "button") For $oButton In $oButtons If $oButton.GetAttribute('autoid') = '_ho2_0' Then _IEAction($oButton, 'Click') Next $oButtons = _IETagNameGetCollection($oIE, "button") For $oButton In $oButtons If $oButton.InnerText = 'Sign out' Then _IEAction($oButton, 'Click') Next
    1 point
  6. Subz

    Control Browser

    #include <IE.au3> Local $oIE = _IECreate('https://www.onlinevideoconverter.com/video-converter', 1) ;~ Add URL Local $oInputs = _IETagNameGetCollection($oIE, 'input') For $oInput In $oInputs If $oInput.id = 'texturl' Then _IEFormElementSetValue($oInput, 'https://www.youtube.com/watch?v=uMK0prafzw0') Next ;~ Click Start Button Local $oInputs = _IETagNameGetCollection($oIE, 'a') For $oInput In $oInputs If $oInput.id = 'convert1' Then _IEAction($oInput, 'Click') Next
    1 point
  7. Did you try this simple code : RunWait('\\AppServ\G$\Connectivity\Clients\Citrix\Receiver\14.5.0.10018\CitrixReceiver.exe ADDLOCAL="ReceiverInside,ICA_Client,WebHelper,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d" ALLOWADDSTORE=A ALLOWSAVEPWD=A ENABLEPRELAUNCH=Y ENABLE_SSON=Yes STORE0="AppStore;https://receiver.domain.net/Citrix/Apps/discovery;on;AppStore" /EnableCEIP=false /includeSSON /noreboot /silent')
    1 point
  8. You can search printers by name using a filter with _PrintMgr_EnumPrinter : #include "PrintMgr.au3" #include <Array.au3> Global $LblPrnArr = ["DYMO LabelWriter 330*", "HP Deskjet 2540*"] For $i = 0 To UBound($LblPrnArr) - 1 ; Loop through all printer types to check $aPrinters = _PrintMgr_EnumPrinter($LblPrnArr[$i]) If Not @error And $aPrinters[0] Then ConsoleWrite("!" & $aPrinters[0] & " printer(s) matching '" & $LblPrnArr[$i] & "' found : " & @CRLF) For $j = 1 To $aPrinters[0] ConsoleWrite(" - " & $aPrinters[$j] & @CRLF) ;~ If _PrintMgr_CancelAllJobs($aPrinters[$j]) Then _PrintMgr_RemovePrinter($aPrinters[$j]) ; <--- Cancel jobs and remove printer Next Else ConsoleWrite("!No printer matches '" & $LblPrnArr[$i] & "'" & @CRLF) EndIf Next Edit : because the printer name is not a sure way, I recommend you to check for the driver name : #include "PrintMgr.au3" #include <Array.au3> Global $LblPrnArr = ["DYMO LabelWriter 330", "HP Deskjet 2540"] Local $aPrinters = _PrintMgr_EnumPrinterProperties() For $i = 0 To UBound($aPrinters) - 1 $sPrinterName = $aPrinters[$i][53] $sDriverName = $aPrinters[$i][31] For $j = 0 To UBound($LblPrnArr) - 1 If StringInStr($sDriverName, $LblPrnArr[$j]) Then ConsoleWrite("Then printer " & $sPrinterName & " uses the driver " & $LblPrnArr[$j] & @CRLF) ;~ If _PrintMgr_CancelAllJobs($sPrinterName) Then _PrintMgr_RemovePrinter($sPrinterName]) ; <--- Cancel jobs and remove printer EndIf Next Next
    1 point
  9. Melba23

    Search In ListView

    Deye, How about this: #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Global $iListView, $iNoCols = 2, $iNoItems = 1000, $aArrData[$iNoItems][$iNoCols], $idInput, $fFilter = False For $i = 1 To $iNoItems IniWrite(@ScriptDir & "\sample.ini", "ITEM", "ITEM " & $i, False) Next Example() Func Example() GUICreate("ListView Original", 350, 500) $idInput = GUICtrlCreateInput("", 5, 5, 340) $iListView = GUICtrlCreateListView("|", 5, 22, 340, 500 - 55) _GUICtrlListView_SetExtendedListViewStyle($iListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) _GUICtrlListView_SetColumnWidth($iListView, 0, 160) _GUICtrlListView_SetColumnWidth($iListView, 1, 160) $aArrData = IniReadSection(@ScriptDir & "\sample.ini", "ITEM") _ArrayDelete($aArrData, 0) ; Remove number of elements from array _GUICtrlListView_AddArray($iListView, $aArrData) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch If $fFilter Then $fFilter = False _Filter() EndIf WEnd EndFunc ;==>Example Func _Filter() ; Get full array $aArrData = IniReadSection(@ScriptDir & "\sample.ini", "ITEM") ; gte required search string $sFind = GUICtrlRead($idInput) ; List of items to delete - quicker to do it all in one go $sDeleteRange = "0" ; Get list of text of checked items $sCheckedItems = "|" For $i = 0 To _GUICtrlListView_GetItemCount($iListView) - 1 If _GUICtrlListView_GetItemChecked($iListView, $i) Then $sCheckedItems &= "|" & _GUICtrlListView_GetItemText($iListView, $i) & "|" EndIf Next ; See if there an input to check against If $sFind <> "" Then ; Loop through array For $i = 1 To $aArrData[0][0] ; Get item text $sItem = $aArrData[$i][0] ; Clear delete flag $fDelete = False ; If item does not match - possible delete If Not StringInStr($sItem, $sFind) Then ; Check if item checked in ListView $iIndex = _GUICtrlListView_FindText($iListView, $sItem) If $iIndex = -1 Then ; Not in ListView so cannot be checked - delete $fDelete = True Else ;See if checked If Not _GUICtrlListView_GetItemChecked($iListView, $iIndex) Then ; If not checked - delete $fDelete = True EndIf EndIf ; if item to be deleted add to list If $fDelete Then $sDeleteRange &= ";" & $i EndIf EndIf Next EndIf ; ; Delete all items in one go _ArrayDelete($aArrData, $sDeleteRange) ; Redraw ListView _GUICtrlListView_DeleteAllItems($iListView) _GUICtrlListView_AddArray($iListView, $aArrData) ; Reset check marks to already checked items For $i = 0 To _GUICtrlListView_GetItemCount($iListView) - 1 If StringInStr($sCheckedItems, "|" & _GUICtrlListView_GetItemText($iListView, $i) & "|") Then _GUICtrlListView_SetItemChecked($iListView, $i) EndIf Next EndFunc ;==>_Filter Func MY_WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $iIDFrom = BitAND($wParam, 0xFFFF) ;LoWord Local $iCode = BitShift($wParam, 16) ;HiWord If $iIDFrom = $idInput And $iCode = $EN_CHANGE Then $fFilter = True EndIf EndFunc ;==>MY_WM_COMMAND The filtering takes some time for 1000 lines, which meant that the script risked spending far too long in the handler, so I have removed that part of the code into a separate function. M23
    1 point
  10. From the Help file about _ArrayDisplay: Run User Func Run the user-defined function passed in $hUser_Function. This function is entirely separate from the UDF and must be created and coded by the user to accept 2 (and only 2) parameters which will be provided by the UDF itself: the full array being displayed and a 1D array holding the selected rows indices with a count in the [0] element. These parameters can then be used inside the user function as required. The button is not displayed if no function is specified. And the code: #include <Array.au3> Global $aSelRows Global $aArray[10][6] For $i = 0 To 9 For $j = 0 To 5 $aArray[$i][$j] = $i & "/" & $j Next Next _ArrayDisplay( $aArray, "Select one/more items. Click ""Run User Func""", "", 0, Default, Default, Default, Default, GetSelected ) Func GetSelected( $aArray, $aSelected ) $aSelRows = $aSelected If $aSelRows[0] = 0 Then MsgBox( 0, "", "Select one/more items. Click ""Run User Func""" ) Else MsgBox( 0, "", $aSelRows[0] & " items selected" ) Send( "{ESC}" ) EndIf EndFunc _ArrayDisplay( $aSelRows )
    1 point
  11. Added import, now all works, check context menu for operations. All this just to show it's possible to export a profile with all definitions you want. I noticed that in order to do some operations i needed #requireadmin maybe if you add that to your code, it works and you don't need to do anything else.
    1 point
  12. UEZ

    Add Menu Icon

    #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <GUIConstants.au3> #include <GUIMenu.au3> #include <GDIPlus.au3> _GDIPlus_Startup() $MenuItemIcons = GUICreate("MenuItem Icons", 180, 117, 192, 124,$WS_SYSMENU) $Menu = GUICtrlCreateMenu("Main") $MenuItem1 = GUICtrlCreateMenuItem(" About", $Menu) $MenuItem2 = GUICtrlCreateMenuItem(" Test", $Menu) $MenuItem3 = GUICtrlCreateMenuItem(" Exit", $Menu) $Label1 = GUICtrlCreateLabel("Testapplication with Icons", 16, 16, 127, 17) $Label2 = GUICtrlCreateLabel("in MenuItems.", 16, 32, 70, 17) $aResources = GCM_SetIcon("c:\Program Files (x86)\AutoIt3\Aut2Exe\Icons\AutoIt_Old4.ico", $Menu, 0) $aResources2 = GCM_SetIcon(@ScriptDir & "\arrow.ico", $Menu, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _GDIPlus_BitmapDispose($aResources[1]) _WinAPI_DeleteObject($aResources[2]) _WinAPI_DestroyIcon($aResources[0]) _GDIPlus_BitmapDispose($aResources2[1]) _WinAPI_DeleteObject($aResources2[2]) _WinAPI_DestroyIcon($aResources2[0]) _GDIPlus_Shutdown() Exit EndSwitch WEnd Func GCM_SetIcon($sFileIcon, $iMenu, $iItem, $iW = 16, $iH = 16) Local $aResources[3] $aResources[0] = _WinAPI_LoadImage(0, $sFileIcon, $IMAGE_ICON, $iW, $iH, $LR_LOADFROMFILE) ;$hIcon $aResources[1] = _GDIPlus_BitmapCreateFromHICON($aResources[0]) ;$hBitmap $aResources[2] = _GDIPlus_Convert2HBitmap($aResources[1], $COLOR_MENU) ;$hGDIBitmap _GUICtrlMenu_SetItemBmp(GUICtrlGetHandle($iMenu), $iItem, $aResources[2]) Return $aResources EndFunc Func _GDIPlus_BitmapCreateFromHICON($hIcon) Local $aResult = DllCall($ghGDIPDll, "int", "GdipCreateBitmapFromHICON", "handle", $hIcon, "handle*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return $aResult[2] EndFunc ;==>_GDIPlus_BitmapCreateFromHICON Func _GDIPlus_Convert2HBitmap($hBitmap, $iColor); removes alpha backround using system color and converts to gdi bitmap Local $iBgColor = _WinAPI_GetSysColor($iColor) $iBgColor = 0x10000 * BitAND($iBgColor, 0xFF) + BitAND($iBgColor, 0x00FF00) + BitShift($iBgColor, 16) Local $iWidth = _GDIPlus_ImageGetWidth($hBitmap), $iHeight = _GDIPlus_ImageGetHeight($hBitmap) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", 0, "int", 0x0026200A, "ptr", 0, "handle*", 0) Local $hBitmap_new = $aResult[6] Local $hCtx_new = _GDIPlus_ImageGetGraphicsContext($hBitmap_new) Local $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $iBgColor) _GDIPlus_GraphicsFillRect($hCtx_new, 0, 0, $iWidth, $iHeight, $hBrush) _GDIPlus_GraphicsDrawImageRect($hCtx_new, $hBitmap, 0, 0, $iWidth, $iHeight) Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_new) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hBitmap_new) _GDIPlus_GraphicsDispose($hCtx_new) Return $hHBITMAP EndFunc ;==>_GDIPlus_Convert2HBitmap Br, UEZ
    1 point
×
×
  • Create New...