shEiD
Active Members-
Posts
77 -
Joined
-
Last visited
shEiD's Achievements
Wayfarer (2/7)
0
Reputation
-
C# - get info (tool-tips) of System Tray icons.
shEiD replied to shEiD's topic in AutoItX Help and Support
@Richard Robertson, Thank You so much. Sorry I haven't been back here for so long. I have asked this question someplace else, and another very helpful person wrote a wrapper dll for me, so I've been using that. But I will go though your solution and examine it and maybe use it. Anyway it will help me a lot as a learning example, so your hard work will not be wasted. Thank you again. -
C# - get info (tool-tips) of System Tray icons.
shEiD replied to shEiD's topic in AutoItX Help and Support
Thank you in advance. I'm still too green to do that myself. -
Hi, could anyone help me with a C# code to get info of icons in System Tray? I can accomplish this in AutoIt, but would very much prefer to be able to have this in c#. I use it daily, to fix some problems/bugs in another software to make it usable, which is in beta now, and until developers fix it, I need to resort to this thing. Crazy enough, there is no other way inbuilt to get the status of a program and what it's doing, except tray icon. No logging, anything at all. They say they are working on it, but until that time... Here's the AutoIt snippet: #include <GuiToolBar.au3> $hTray = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') $iconCount = _GUICtrlToolbar_ButtonCount($hTray) For $i = 0 To $iconCount - 1 $text = _GUICtrlToolbar_GetButtonText($hTray, $i) ConsoleWrite($text & @LF) Next The most important thing, is to get tray icon tool-tip. I would like to get more, if possible as well, but tool-tip is crucial. I'm a hobbyist and only learning programming (C#). I don't know c++, nor I know how to properly PInvoke in c#, and I'm not confident enough to mess with unmanaged code. I even tried to accomplish this in C# using AutoItX3_x64.dll, but could not figure it out. Any help would be much appreciated. Maybe at least someone could tell me, where else I could ask for help on this, if not here? Autoit is awesome, I use it daily, sadly this project is just too big and complicated to do it all in Autoit only. Main reason - I want to use WPF.
-
[SOLVED] ListView border: disable or change color
shEiD replied to shEiD's topic in AutoIt GUI Help and Support
@Melba23 Thanks again for the answers and help. If you think of way to achieve this via native listview, please lemme know. Marking topic as solved. -
[SOLVED] ListView border: disable or change color
shEiD replied to shEiD's topic in AutoIt GUI Help and Support
Thank YOU. I've spent hours on this trying this and that, searching the forums and chm, nothing worked. Just out of curiosity, did I miss this solution in the help.chm? I mean I still don't get it, which style fixed the problem with the rows not showing. Oh, and 1 more thing I forgot before: is there a way to change "selection" color? I mean, the default blue color does not look good with this gui color... -
Hi, I would like to create a listview with no border, no column headers and custom color. I've tried creating a listview control in two different ways, but couldn't get the wanted result Help please. ; My example Gui #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ListviewConstants.au3> #include <GuiListView.au3> Global Const $COLOR_GUI = 0x494E49 Global Const $COLOR_TEXT = 0xE6ECE0 $GUI = GUICreate('test', 300, 500, -1, -1) GUISetBkColor($COLOR_GUI) ; ======================= ListView 1 ; everything works, except: ; how can I remove the border (or change it's color) $listview = GUICtrlCreateListView("col1|col2|col3", 10, 10, 280, 200, $LVS_NOCOLUMNHEADER) GUICtrlSetBkColor(-1, $COLOR_GUI) GUICtrlSetColor(-1, $COLOR_TEXT) $item1 = GUICtrlCreateListViewItem("test|col22|col23", $listview) $item2 = GUICtrlCreateListViewItem("item1|col12|col13", $listview) $item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview) _GUICtrlListView_SetColumnWidth($listview, 0, 100) _GUICtrlListView_SetColumnWidth($listview, 1, 100) _GUICtrlListView_SetOutlineColor($listview, $COLOR_GUI) ; ======================= ListView 2 ; cool, does not have a border, but: $hListView = _GUICtrlListView_Create($GUI, "col1|col2|col3", 10, 220, 280, 200, $LVS_NOCOLUMNHEADER) _GUICtrlListView_SetBkColor($hListView, $COLOR_GUI) _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1, 1) _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2, 2) _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1) ; <--------------------- Does NOT work! _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1, 2) ; <------------ Does NOT work! _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2) ; <--------------------- Does NOT work! _GUICtrlListView_SetColumnWidth($hListView, 0, 250) ; <------------------------- Does NOT work! GUISetState(@SW_SHOW) While 1 $eMSG = GUIGetMsg() Switch $eMSG Case -3 Exit EndSwitch WEnd Gui screenshot:
-
Thank You for answers, I spent hours on this yesterday I figured out that yesterday by trying to work out how some examples do it and how could I use them to do what I wanna do. When I could not find the codes in msdn it made me think that I'm not understanding this correctly. It's messed up, why would they not provide the codes? Or do they, and I just don't know how to find them? I found them in #includes, but it seems not all of them, that made me confused even more... I needed "on change" notification for Input control, but could not find it. Would $EN_CHANGE = 0x300 from EditConstants.au3 be ok to use with Input control? Thank You, it helps so much, at least I know I'm not mad Explanation of this would be awesome, hope you'll be able to do it Thanks, will try to read that, though I'm completely new to this, so it'll be long and hard I guess. Your description does not inspire confidence I needed to catch notifications for 2 things in my gui: 1. change in the Input control (data in another control reacts "live" on the text being entered in the Input control, 2. click on listview item, ie: on click I check if any items are selected, or there are no selections. Here is how I managed to acomplish these two things: GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") ; for input GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ; for listview items Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $nNotifyCode = BitShift($wParam, 16) Local $id = BitAND($wParam, 0x0000FFFF) If $id = 4 Or $id = 5 Then If $nNotifyCode = 768 Then ; code ConsoleWrite("input control changed" & @CRLF) EndIf EndIf EndFunc ;==>MY_WM_COMMAND Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam Local $iIDFrom, $iCode, $tNMHDR $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $iIDFrom Case $ListView22 Switch $iCode Case $NM_CLICK Switch _GUICtrlListView_GetSelectedCount($ListView22) Case 0 ConsoleWrite("no items selected" & @CRLF) Case Else ConsoleWrite("items selected" & @CRLF) EndSwitch EndSwitch EndSwitch EndFunc ;==>WM_NOTIFY Maybe there is a better way to do this?
-
A simple example (cannibalized the GUIRegisterMsg example): #include <WindowsConstants.au3> $Form1 = GUICreate("test", 190, 100, -1, -1) $Input1 = GUICtrlCreateInput("", 20, 20, 150, 21) $Button1 = GUICtrlCreateButton("button", 60, 60, 75, 25) GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch WEnd Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam) $nNotifyCode = BitShift($wParam, 16) $nID = BitAND($wParam, 0x0000FFFF) $hCtrl = $lParam ConsoleWrite("GUIHWnd" & @TAB & ":" & $hWnd & @LF & _ "MsgID" & @TAB & ":" & $Msg & @LF & _ "wParam" & @TAB & ":" & $wParam & @LF & _ "lParam" & @TAB & ":" & $lParam & @LF & _ "Code" & @TAB & ":" & $nNotifyCode & @LF & _ "CtrlID" & @TAB & ":" & $nID & @LF & _ "CtrlHwnd:" & $hCtrl & @LF & @LF) EndFunc ;==>MY_WM_COMMANDQuestions: How do I match the codes generated by MY_WM_COMMAND() to the codes the "Windows Message Codes" list in AutoIt's help file? I mean the codes results in the example do not match neither "$wParam" nor "Code" values..? martin points to msdn library for more info on notifications, but I can't find the list of codes anywhere on msdn. Sorry, I'm not used to msdn library. Let's say I go to Edit Control then to Notifications > EN_CHANGE - there is no code value provided there Where can I find a complete list of windows message codes? Thanks in advance.
-
Hi, Is there any "simple" way to keep the label on top, while updating progress control underneath? It seems progress steals "top most" when updated: #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIConstantsEx.au3> $Gui = GUICreate('', 150, 20, -1, -1, $WS_POPUP) $GcProgress = GUICtrlCreateProgress(0, 0, 150, 20) $GcLabel = GUICtrlCreateLabel('progress', 0, 3, 150, 14, $SS_CENTER, $WS_EX_TOPMOST) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() For $i = 1 To 100 GUICtrlSetData($GcProgress, $i) Sleep(30) Next Sleep(1000) Exit I want only a small progress (hence popup window) to display packing/unpacking archive progress with archives name on top.
-
Sorry, probably my question was poorly formulated. I know, that you can save a shortcut to rdp session and save credentials, so you'll be able to auto login to rdp session, I use it all the time. What I meant to ask is, if Autologon logs in the remote user connecting via rdp. I mean, that would be totally unsafe. So to elaborate, can I have my server set to allow remote connections by rdp and have autologon on the same server, but be safe at the same time from users automagically login in, without knowing login/psw of the server? If I setup autologon, will it auto login me only when I turn on / restart the pc "locally/physically" or is it unsafe/will login whenever need be (even on incoming rdp sessions). I hope it's possible to understand my rambling now
-
What about RDP? If I have rdp enabled on the pc, on which I would use this autologon tool, would anyone trying to connect with remote desktop to that pc be able to autologin?
-
DirMove() bug? Only works with flag=1
shEiD replied to shEiD's topic in AutoIt General Help and Support
@Tvern Thanks anyway About example in the first post: Help file for DirMove says: Or should I understand that DirMove does not overwrite folders if they exist aswell, not only files? If this is the case then help file needs clarification. -
DirMove() bug? Only works with flag=1
shEiD replied to shEiD's topic in AutoIt General Help and Support
@somdcomputerguy Huh? I don't get it, what did you mean by that? What it has to do with overwriting and creating folder (your qoute of my code). There is no overwriting needed in the example. Anyway, DirMove is pretty weird or f***ed up - even more bugs?: Examples: Example2() Example3() Func Example2() DirCreate('C:\DirMove.Test.2\Flag.1') FileWriteLine('C:\DirMove.Test.2\Flag.1\test.txt', 'test') Sleep(1500) DirMove('C:\DirMove.Test.2\Flag.1', 'C:\DirMove.Test.2\Destination', 1) EndFunc ;==>Example Func Example3() DirCreate('C:\DirMove.Test.3\Destination') DirCreate('C:\DirMove.Test.3\Flag.1') FileWriteLine('C:\DirMove.Test.3\Flag.1\test.txt', 'test') Sleep(1500) DirMove('C:\DirMove.Test.3\Flag.1', 'C:\DirMove.Test.3\Destination', 1) EndFunc ;==>Example Exit Example 2: file gets moved to "C:\DirMove.Test.2\Destination" (what the hell?) Example 3: file gets moved to "C:\DirMove.Test.3\Destination\Flag.1" (ok) It seems, if destination directory does not exist, weird s**t happens Edit: nevermind, just read help file again, and I gather in the Example2 DirMove() behaves like DirRename (which is not present in AutoIt). Confusing... But what with the flags 0/ no flag not working, I still don't get it... -
Hi, I just spent 2 hours looking for a bug in my script, until finally I realized, that the bug is in AutoIt's DirMove() itself, it seems... Example: Example() Func Example() DirCreate('C:\DirMove.Test\Destination') DirCreate('C:\DirMove.Test\Flag.None') DirCreate('C:\DirMove.Test\Flag.0') DirCreate('C:\DirMove.Test\Flag.1') Sleep(1500) DirMove('C:\DirMove.Test\Flag.None', 'C:\DirMove.Test\Destination') DirMove('C:\DirMove.Test\Flag.0', 'C:\DirMove.Test\Destination', 0) DirMove('C:\DirMove.Test\Flag.1', 'C:\DirMove.Test\Destination', 1) EndFunc ;==>Example ExitThe only folder that gets moved is Flag.1. No flag or flag=0 does not work and returns 0. Please confirm. Thanks in advance.
-
(Solved) How to get file list inside the rar archive?
shEiD replied to shEiD's topic in AutoIt General Help and Support
@JFX thank You, works like a charm. Wonder why there's nothing about this command in winrar's help? Strange and annoying... @water I had that UDF, but had completely forgot about it, though, methinks it is too old and crashes on this version of autoit, iirc. Thank You for reminding me, I will try to look into it.