AHK and dexpot

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) :( :o :shock: :? :cool: :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: (wave) :ok: (nod)
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: AHK and dexpot

Re: AHK and dexpot

Post by Patrick » 06.06.2013 17:26:29

:dex:

Here is another example that gives you a list of all Chrome windows on the current desktop. Should work with any Dexpot settings.

Code: Select all

WinGet, windows, List, ahk_class Chrome_WidgetWin_1
Loop %windows% {
   hWnd := windows%A_Index%
   WinGet, style, Style, ahk_id %hWnd%
   WinGet, exstyle, ExStyle, ahk_id %hWnd%
   if((style & 0x10000000) <> 0 AND (exstyle & 0x08000000) = 0) {
      WinGetTitle, title, ahk_id %hWnd%
      MsgBox %title%
   }
}

Re: AHK and dexpot

Post by Noesis » 05.06.2013 04:29:48

This is an example of a script I use for Firefox hopefully it will help. Keep in mind however that things may work differently depending on how you have the windows set up in Dexpot.

NB: In this example, I've got firefox set up in dexpot's "mywechsel.ini" in the [Exe] section as "firefox.exe=move", hence the else if statement is never actually used in the following script but I left it in there so I'd know what to expect for other scripts.

Code: Select all

; Activates the Firefox window or opens the program if no window exists
SetTitleMatchMode 2
if WinExist("- Mozilla Firefox ahk_class MozillaWindowClass") ;only true if win on current Dexpot Desktop unless "move" is used in the mywechsel.ini
   WinActivate, - Mozilla Firefox ahk_class MozillaWindowClass
else if WinExist( "ahk_exe firefox.exe") ;will be true no matter what Dexpot Desktop Window is on
   WinShow - Mozilla Firefox ahk_class MozillaWindowClass ;Copies the window
else
   Run, C:\Program Files (x86)\Mozilla Firefox\firefox.exe
SetTitleMatchMode 1
exit


Hope this is of some help.

AHK and dexpot

Post by akilem » 03.06.2013 11:46:02

Hello,

Dexpot is an incredieble piece of software. It radiccaly changes the way I work. So many thanks to support it and continue to develop it.

An another incredible software I use is AHK (AutoHotKey) which is a scripting language I use to automate a lot of tasks and provide a better experience in Windows.

One thing I would like to achieve is to test if a window is actually present in a virtual desktop ? Does anybody have some direction to search for a solution ?

For example, if Chrome/Explorer... is present in the wirtual desktop add a new tab, if not start a new instance of the program (and live it is the others virtual desktop).

Many thanks,

Top