Jump to content

ycomp

Active Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by ycomp

  1. I want to press a key like 'b' or spacebar on a window (another program, not mine) and be informed when this occurs so I can respond to it. I do not want to consume the keypress, just know that it happened. I'm not really interested in modifiers just letters and the spacebar.
  2. could you link to the specs/docs for virtual desktops on win11? also it wouldn't hurt for win10 as well so I can compare. I might be able to get the few methods I need working this way, given that I have your win10 autoit code already. wow, you're a genius) I have 11 desktops btw
  3. replaced it, something is not right.. it doesn't give that error but doesn't make it to my hello consolewrite #include <Debug.au3> #include <Constants.au3> #include <GUIConstants.au3> ;_DebugSetup("LAzy Summer Home") ;_DebugOut("Right outside...") ;~ _DebugSetup("hi") ;~ _DebugOut("FAILED TAGGING") ;~ _DebugOut(" - Moved Folder") #include <Array.au3> ;~ Local $failedMoving[0][2] ;~ Dim $a = [["abc", "TAG-FAILED"]] ;~ _ArrayAdd($failedMoving, $a) ;~ _ArrayDisplay($failedMoving) ;~ While 1 ;~ Dim $text = InputBox("Text", "Enter some Text to Match") ;~ if @error <> 0 Then ExitLoop ;~ If StringRegExp($text, "(?i)(Garcia|JGB|Legion of Mary|Reconstruction|Old & in the Way|Old and in the way)") Then ;~ MsgBox(0, "MATCHED", "matched Jerry!") ;~ Else ;~ MsgBox(0, "NO MATCH", "poor Jerry..") ;~ EndIf ;~ WEnd ;~_ArrayDisplay($CmdLine) Opt("MustDeclareVars", True) ;If @OSVersion <> "WIN_10" Then Exit MsgBox($MB_SYSTEMMODAL, "", "This script only runs on Win 10") ; Instanciation objects Local $CLSID_ImmersiveShell = "{c2f03a33-21f5-47fa-b4bb-156362a2f239}" Local $IID_IUnknown = "{00000000-0000-0000-c000-000000000046}" Local $IID_IServiceProvider = "{6D5140C1-7436-11CE-8034-00AA006009FA}" Local $tIID_IServiceProvider = __uuidof($IID_IServiceProvider) Local $tagIServiceProvider = _ "QueryService hresult(struct*;struct*;ptr*);" ; VirtualDesktopManagerInternal object Const Enum $eLeftDirection = 3, $eRightDirection Local $CLSID_VirtualDesktopManagerInternal = "{C5E0CDCA-7B6E-41B2-9FC4-D93975CC467B}" Local $tCLSID_VirtualDesktopManagerInternal = __uuidof($CLSID_VirtualDesktopManagerInternal) Local $IID_IVirtualDesktopManagerInternal = "{B2F925B9-5A0F-4D2E-9F4D-2B1507593C10}" Local $tIID_IVirtualDesktopManagerInternal = __uuidof($IID_IVirtualDesktopManagerInternal) Local $tagIVirtualDesktopManagerInternal = _ "GetCount hresult(int*);" & _ "MoveViewToDesktop hresult(ptr;ptr);" & _ "CanViewMoveDesktops hresult(ptr;bool*);" & _ "GetCurrentDesktop hresult(ptr*);" & _ "GetDesktops hresult(ptr*);" & _ "GetAdjacentDesktop hresult(ptr;int;ptr*);" & _ "SwitchDesktop hresult(ptr);" & _ "CreateDesktopW hresult(int*);" & _ "RemoveDesktop hresult(ptr;ptr);" & _ "FindDesktop hresult(struct*;ptr*);" ; ApplicationViewCollection object Local $CLSID_IApplicationViewCollection = "{1841C6D7-4F9D-42C0-AF41-8747538F10E5}" Local $tCLSID_IApplicationViewCollection = __uuidof($CLSID_IApplicationViewCollection) Local $IID_IApplicationViewCollection = "{1841C6D7-4F9D-42C0-AF41-8747538F10E5}" Local $tIID_IApplicationViewCollection = __uuidof($IID_IApplicationViewCollection) Local $tagIApplicationViewCollection = _ "GetViews hresult(struct*);" & _ "GetViewsByZOrder hresult(struct*);" & _ "GetViewsByAppUserModelId hresult(wstr;struct*);" & _ "GetViewForHwnd hresult(hwnd;ptr*);" & _ "GetViewForApplication hresult(ptr;ptr*);" & _ "GetViewForAppUserModelId hresult(wstr;int*);" & _ "GetViewInFocus hresult(ptr*);" ; ApplicationView object Local $IID_IApplicationView = "{372E1D3B-38D3-42E4-A15B-8AB2B178F513}" Local $tagIApplicationView = _ "GetIids hresult(ulong*;ptr*);" & _ "GetRuntimeClassName hresult(str*);" & _ "GetTrustLevel hresult(int*);" & _ "SetFocus hresult();" & _ "SwitchTo hresult();" & _ "TryInvokeBack hresult(ptr);" & _ "GetThumbnailWindow hresult(hwnd*);" & _ "GetMonitor hresult(ptr*);" & _ "GetVisibility hresult(int*);" & _ "SetCloak hresult(int;int);" & _ "GetPosition hresult(clsid;ptr*);" & _ "SetPosition hresult(ptr);" & _ "InsertAfterWindow hresult(hwnd);" & _ "GetExtendedFramePosition hresult(struct*);" & _ "GetAppUserModelId hresult(wstr*);" & _ "SetAppUserModelId hresult(wstr);" & _ "IsEqualByAppUserModelId hresult(wstr;int*);" & _ "GetViewState hresult(uint*);" & _ "SetViewState hresult(uint);" & _ "GetNeediness hresult(int*);" ; VirtualDesktopPinnedApps object Local $CLSID_VirtualDesktopPinnedApps = "{b5a399e7-1c87-46b8-88e9-fc5747b171bd}" Local $tCLSID_VirtualDesktopPinnedApps = __uuidof($CLSID_VirtualDesktopPinnedApps) Local $IID_IVirtualDesktopPinnedApps = "{4ce81583-1e4c-4632-a621-07a53543148f}" Local $tIID_IVirtualDesktopPinnedApps = __uuidof($IID_IVirtualDesktopPinnedApps) Local $tagIVirtualDesktopPinnedApps = _ "IsAppIdPinned hresult(wstr;bool*);" & _ "PinAppID hresult(wstr);" & _ "UnpinAppID hresult(wstr);" & _ "IsViewPinned hresult(ptr;bool*);" & _ "PinView hresult(ptr);" & _ "UnpinView hresult(ptr);" ; Miscellaneous objects Local $IID_IObjectArray = "{92ca9dcd-5622-4bba-a805-5e9f541bd8c9}" Local $tagIObjectArray = _ "GetCount hresult(int*);" & _ "GetAt hresult(int;ptr;ptr*);" Local $IID_IVirtualDesktop = "{FF72FFDD-BE7E-43FC-9C03-AD81681E88E4}" Local $tIID_IVirtualDesktop = __uuidof($IID_IVirtualDesktop) Local $tagIVirtualDesktop = _ "IsViewVisible hresult(ptr;bool*);" & _ "GetId hresult(clsid*);" ; objects creation Local $pService Local $oImmersiveShell = ObjCreateInterface($CLSID_ImmersiveShell, $IID_IUnknown, "") ConsoleWrite("Immersive shell = " & IsObj($oImmersiveShell) & @CRLF) $oImmersiveShell.QueryInterface($tIID_IServiceProvider, $pService) ConsoleWrite("Service pointer = " & $pService & @CRLF) Local $oService = ObjCreateInterface($pService, $IID_IServiceProvider, $tagIServiceProvider) ConsoleWrite("Service = " & IsObj($oService) & @CRLF) Local $pApplicationViewCollection, $pVirtualDesktopManagerInternal, $pVirtualDesktopPinnedApps $oService.QueryService($tCLSID_IApplicationViewCollection, $tIID_IApplicationViewCollection, $pApplicationViewCollection) ConsoleWrite("View collection pointer = " & $pApplicationViewCollection & @CRLF) Local $oApplicationViewCollection = ObjCreateInterface($pApplicationViewCollection, $IID_IApplicationViewCollection, $tagIApplicationViewCollection) ConsoleWrite("View collection = " & IsObj($oApplicationViewCollection) & @CRLF) $oService.QueryService($tCLSID_VirtualDesktopManagerInternal, $tIID_IVirtualDesktopManagerInternal, $pVirtualDesktopManagerInternal) ConsoleWrite("Virtual Desktop pointer = " & $pVirtualDesktopManagerInternal & @CRLF) Local $oVirtualDesktopManagerInternal = ObjCreateInterface($pVirtualDesktopManagerInternal, $IID_IVirtualDesktopManagerInternal, $tagIVirtualDesktopManagerInternal) ConsoleWrite("Virtual Desktop = " & IsObj($oVirtualDesktopManagerInternal) & @CRLF) $oService.QueryService($tCLSID_VirtualDesktopPinnedApps, $tIID_IVirtualDesktopPinnedApps, $pVirtualDesktopPinnedApps) ConsoleWrite("Virtual Desktop Pinned Apps = " & $pVirtualDesktopPinnedApps & @CRLF) Local $oVirtualDesktopPinnedApps = ObjCreateInterface($pVirtualDesktopPinnedApps, $IID_IVirtualDesktopPinnedApps, $tagIVirtualDesktopPinnedApps) ConsoleWrite("Virtual Desktop Pinned Apps = " & IsObj($oVirtualDesktopPinnedApps) & @CRLF) Local $iCount, $pCurrent, $pLeft, $pNew, $iHresult, $hWnd, $pView, $pArray, $pDesktop, $oArray, $oView, $sView, $bValue ; gives the number of virtual desktops $iHresult = $oVirtualDesktopManagerInternal.GetCount($iCount) ConsoleWrite("Hello") ConsoleWrite("Number of Desktop = " & $iCount & "/" & $iHresult & @CRLF) If $iCount > 1 Then Exit MsgBox($MB_SYSTEMMODAL, "", "Please close all additional Virtual Desktops") Func __uuidof($sGUID) Local $tGUID = DllStructCreate("ulong Data1;ushort Data2;ushort Data3;byte Data4[8]") DllCall("ole32.dll", "long", "CLSIDFromString", "wstr", $sGUID, "struct*", $tGUID) If @error Then Return SetError(@error, @extended, 0) Return $tGUID EndFunc ;==>__uuidof
  4. replaced it, same error I know they rewrote the taskbar in win11 to use some kind of special new UI framework microsoft has, no idea about virtual desktops. However, they really look and act the same so I doubt they changed that internally. The big difference is that you can move desktops around in win11.. drag them. I don't know if newer versions of win 10 can do this or not
  5. ok, note i'm not running your full script the stuff between "please close all additional virtual desktops") and the __uuidof() function was removed to make it easier to test
  6. I get so I guess the answer is no, it doesn't work on windows 11 (
  7. ah thanks , for some reason my browser search couldn't find it
  8. Hi, I have a few questions: 1) will this work under Windows 11 as well? I ask because I notice that some virtual desktop tools I've been using before on win10 don't seem to work on win11 2) where can I find this function ?
  9. Is it possible to drag files from Windows Explorer onto an AutoIt Listbox and determine which item #1 it was dropped on?
  10. thanks I had a suspicion it might be something like that, I was hoping there was an easier way
  11. would there be a way to create a function that takes all the parameters you would use for DllCall() and then it calls DllCall() with those parameters? I ask because DllCall() takes a variable # of parameters so I'm not sure how that works.
  12. I used _DebugOut(@LF) @CRLF i think printed 2 lines
  13. I guess I should try _DebugOut(@CRLF) ?
  14. does consolewrite write to the debug window? I mean the thing created by _DebugSetup() ?
  15. How do I print a blank line to the Debug Window?
  16. This is a pretty simple script that lets you read the position data of the active window and apply parts of it to other windows (which must be active when being applied to) apply: height AND width or X or Y WinStamp.au3
  17. Hi, Just a general question... would it be possible to write a dexpot plugin (www.dexpot.de) using autoit? I downloaded the sdk and checked it out, it is just c++ (visual c++ looks like) I have only the most basic autoit experience, and I haven't touched c++ since I was a kid but I can program. So as long as I know it's possible, I can go from there.
  18. nevermind... genius that I am, I figured it out! muttley http://www.autoitscript.com/forum/index.ph...l=syslistview32
  19. I would like to be able to read data from the first row of a listview... a specific column index, is this possible? au3info tells me it is Class: SysListView32
  20. thanks but I mean in relation to my original question... I'm not creating my own controls.
  21. can't quite figure out how to call the GUI functions... I am not sure how to get the control id for it.
  22. Hi, I figured out how to use the control ID to set the text of a control (I think it is some kind of edit box, or label) of another app. My question is, how can I change the color? I would like to change to lime or red. thanks!
  23. great... thanks for the help
  24. how can I read an item from another app's listview? I mean I assume I can find the listview easy enough with the au3info tool... but how do I read say line 2?
×
×
  • Create New...