Search found 94 matches

by partof
26 Dec 2017, 08:27
Forum: Ask For Help
Topic: how to know if windows media player is playing or not? Topic is solved
Replies: 16
Views: 2256

Re: how to know if windows media player is playing or not? Topic is solved

Thank you so much for your help!

@Qwerty: my mind exploded while trying to follow your code...
by partof
23 Dec 2017, 12:51
Forum: Ask For Help
Topic: how to know if windows media player is playing or not? Topic is solved
Replies: 16
Views: 2256

Re: how to know if windows media player is playing or not? Topic is solved

(Sorry, for some reason it posted as guest) I tried that: #Include com.ahk com_Init() playState := COM_CreateObject(wmp, "playState") MsgBox %playState% and that #Include com.ahk com_Init() playState := COM_Invoke(wmp, "playState") MsgBox %playState% it sends nothing (the play is not detected) I fin...
by partof
23 Dec 2017, 10:31
Forum: Ask For Help
Topic: how to know if windows media player is playing or not? Topic is solved
Replies: 16
Views: 2256

Re: how to know if windows media player is playing or not? Topic is solved

Thanks for your help! I guess I need to add #Include C:\Users\Me\Desktop\my_folder\COM.ahk at the beginning of the script (which is on the same folder than the github file) When I run it I get the error below (when I run the COM.ahk it sends the same error): Error: Call to nonexistent function. Spec...
by partof
23 Dec 2017, 08:13
Forum: Ask For Help
Topic: how to know if windows media player is playing or not? Topic is solved
Replies: 16
Views: 2256

how to know if windows media player is playing or not? Topic is solved

I tried several codes (such as these https://autohotkey.com/board/topic/30791-can-ahk-get-play-state-of-windows-media-player/://autohotkey.com/board/topic/30791-can-ahk-get-play-state-of-windows-media-player/?&st=0 ) but they don't seem to work anymore (maybe they are not compatible anymore with the...
by partof
21 Dec 2017, 10:14
Forum: Scripts and Functions
Topic: if the sound is mute, unmute it
Replies: 1
Views: 409

if the sound is mute, unmute it

(I found this code here https://autohotkey.com/board/topic/14086-check-to-see-if-audio-mute-onoff/ I post it under this title because it would have saved me some time to find it) to mute you need to send {Volume_Mute} to unmute you also need to send {Volume_Mute} so you need to check if it's mute fi...
by partof
13 Dec 2017, 06:13
Forum: Scripts and Functions
Topic: google docs using a shortcut to change the font color
Replies: 1
Views: 935

Re: google docs using a shortcut to change the font color

edit it's much easier (and safe) to pass simply use the mouse click: ; #IfWinActive ahk_exe chrome.exe ; the shortcut will only work on chrome ; !^+p:: ; Alt(!) CTRL(^) shift(+) !^+p ; click, 652, 74 ; sleep 100 ; click, 784, 180 ; return if you want to rotate from one color to another to another: h...
by partof
13 Dec 2017, 06:12
Forum: Scripts and Functions
Topic: google doc: change (and rotate) color using a shortcut
Replies: 0
Views: 226

google doc: change (and rotate) color using a shortcut

If the color is black change it to blue, if it's blue change it to red, etc. else change it to black. ; ************** check if windows full screen #IfWinActive ahk_exe chrome.exe ; the shortcut will only work on chrome !^+p:: ;PART 1: check if the docs is in full-screen (the script work with the mo...
by partof
13 Dec 2017, 05:05
Forum: Ask For Help
Topic: Detect if active window is full screen or not
Replies: 3
Views: 877

Re: Detect if active window is full screen or not

it's simple. You just need to find a color specific to full-creen (or not full screen). For exemple on full-screen I see the red cross yo close the chrome window, full screen is white. You find all the info needed in the windows spy tool ; put the mouse on the right top corner of the screen, freeze ...
by partof
13 Dec 2017, 04:33
Forum: Ask For Help
Topic: Copy Html text, modify it (ex change color of text), paste it back in google docs
Replies: 8
Views: 406

Re: Copy Html text, modify it (ex change color of text), paste it back

Thanks so much for your help! I am getting closer and closer. Here is my current code but I still have a problem. The Html copied contains UTF-8 characters that are replaced with things like è or é. In GetHtml from WinClip.ahk, I tried to replaced CPO by UTF-16 but it sends back chinese characters...
by partof
13 Dec 2017, 04:00
Forum: Scripts and Functions
Topic: google docs using a shortcut to change the font color
Replies: 1
Views: 935

google docs using a shortcut to change the font color

This code doesn't keep the formatting of your text. It only copies the text of your clipboard, set a blue color to it and past it as HTML WARNING: watch the delay, if you put a delay to short before the backspace it can break your docs (even if you chose a previous version) (It probably delete some ...
by partof
13 Dec 2017, 03:42
Forum: Scripts and Functions
Topic: shortcut to automatically reduce the font size in google docs
Replies: 0
Views: 175

shortcut to automatically reduce the font size in google docs

; *********************** shortcut to automatically reduce the font size (at 6) in google docs #IfWinActive ahk_exe chrome.exe ; the shortcut will only work on chrome ^-:: ;you can use any of these: Alt(!) CTRL(^) shift(+) win(#) click, 512, 177 ; to find the position of the mouse use the "relative...
by partof
12 Dec 2017, 11:59
Forum: Ask For Help
Topic: Copy Html text, modify it (ex change color of text), paste it back in google docs
Replies: 8
Views: 406

Re: Copy Html text, modify it (ex change color of text), paste it back

Thanks jeeswg for your help! I have tried RTF with WinClip.GetRTF and WinClip.SetRTF but I don't know how I can modify the color of the text after that (I can't display the RTF text in a msgbox)

Sorry but I don't understand your second point.
by partof
12 Dec 2017, 11:39
Forum: Ask For Help
Topic: Copy Html text, modify it (ex change color of text), paste it back in google docs
Replies: 8
Views: 406

Re: Copy Html text, modify it (ex change color of text), paste it back

I am getting closer. I am using WinClip from https://autohotkey.com/board/topic/74670-class-winclip-direct-clipboard-manipulations/ But there are 2 problems: 1)It works if I paste in an HTML editor but I get this annoying line at the beginning, which I can't remove Version:0.9 StartHTML:0000000105 E...
by partof
12 Dec 2017, 07:55
Forum: Ask For Help
Topic: Copy Html text, modify it (ex change color of text), paste it back in google docs
Replies: 8
Views: 406

Copy Html text, modify it (ex change color of text), paste it back in google docs

Hi! I would like to have a keyboard shorcut that will copy to the clipboard a text I have selected (in word, in google docs, in an HTML editor), change the color of the text and then paste it so that it replaces the selected text. I have seen this post http://www.autohotkey.com/forum/viewtopic.php?p...
by partof
06 Nov 2017, 02:09
Forum: Ask For Help
Topic: disable ctrl+W on chrome for specific tabs
Replies: 2
Views: 203

Re: disable ctrl+W on chrome for specific tabs

excellent, thanks a lot!

Here is the code to disable ctrl+w for the tab named test1 and test2

Code: Select all

SetTitleMatchMode, Regex

#If WinActive("test1 ahk_class Chrome_WidgetWin_1") || WinActive("test2 ahk_class Chrome_WidgetWin_1") 
		^w::
		^q::
			return  ; do nothing

#IfWinActive
by partof
05 Nov 2017, 17:21
Forum: Ask For Help
Topic: disable ctrl+W on chrome for specific tabs
Replies: 2
Views: 203

disable ctrl+W on chrome for specific tabs

hi! I wanted ahk to disable ctrl+w on pinned tab but that doesn't seem to be possible so instead, I want to disable ctrl+W on a specific tab name ("test") This code doesn't work, any advice would be really appreciated SetTitleMatchMode, Regex #IfWinActive, ahk_class Chrome_WidgetWin_1 and WindowTitl...
by partof
20 Oct 2017, 01:48
Forum: Ask For Help
Topic: how to trigger the menu of an app in the taskbar (which has no windows and is trigger by left/right click)
Replies: 2
Views: 190

Re: how to trigger a menu of an app in the taskbar (which has no windows)

Thanks a lot jeeswg but your code doesn't work on that (but it works on ditto context menu which is only triggered by a right click, which is awesome!). The menu of my app is trigger either by a left or right click. (By the way, it doesn't work also on shareX context menvu which is only triggered by...
by partof
19 Oct 2017, 16:27
Forum: Ask For Help
Topic: how to trigger the menu of an app in the taskbar (which has no windows and is trigger by left/right click)
Replies: 2
Views: 190

how to trigger the menu of an app in the taskbar (which has no windows and is trigger by left/right click)

Hi, I'm trying to trigger that menu for the sleep# app . As you see in the print screen bellow this app doesn't have any windows. The settings can only be accessed through the taskbar. The "windows spy" doesn't show anything useful. I struggle to trigger those 3 steps: https://i.imgur.com/qySxFVm.pn...
by partof
10 Oct 2017, 04:30
Forum: Tips and Tricks
Topic: convert to UPPER/lowercase
Replies: 6
Views: 1965

convert to UPPER/lowercase

I did not find a way to make it work with UTF-8 (any idea?) but here is a working code for Asc characters ; Alt(!) CTRL(^) shift(+) win(#) win(e) #p:: ; convert to UPPER/LOWERCASE Convert_Inv() RETURN Convert_Inv() { Clipboard= ; set clipboard to ctrl+c Send ^c ; copy highlighted text to clipboard ...
by partof
17 Jul 2017, 05:50
Forum: Ask For Help
Topic: how to replace A or B or C by "1" ?
Replies: 4
Views: 268

Re: how to replace A or B or C by "1" ?

Thanks to Era_Scarecrow here is the answer:

Code: Select all

Unwrapped:=RegExReplace(Unwrapped, "(A|B|C)", "1")
or to search/replace for the word only:

Code: Select all

Unwrapped:=RegExReplace(Unwrapped, "(\bA\b|\bB\b|\bC\b)", "1")

Go to advanced search