Search found 4578 matches

by jeeswg
Yesterday, 17:29
Forum: Ask For Help
Topic: Script is providing inconsistent results
Replies: 1
Views: 37

Re: Script is providing inconsistent results

- I would avoid trying to click at the nth character, because its position may be affected by the widths of the other characters, which can change. - Also, odd things can happen with clicking e.g. if you click at a certain speed, you may select a word or the entire string. - I would put a date into ...
by jeeswg
Yesterday, 04:04
Forum: Ask For Help
Topic: ACC Library, Yet another question. Topic is solved
Replies: 2
Views: 47

Re: ACC Library, Yet another question. Topic is solved

- Often you can use accDoDefaultAction to invoke/'click' buttons. - For right-click, you can use Acc to find the GUI element's position, and then send a right-click via AutoHotkey's Click/MouseClick commands. I don't know if there's a better way than that. - Note: accDefaultAction (without the 'Do')...
by jeeswg
Yesterday, 04:01
Forum: Ask For Help
Topic: Change the tray icon – up-to-date method?
Replies: 4
Views: 98

Re: Change the tray icon – up-to-date method?

- This script tries to change the icons in the address space: change AutoHotkey's 4 systray icons - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=46043 - I also added this to my wish list, 'tray icons: specify hIcons for the 4 icons': Wish List 2.0 - AutoHotkey Community...
by jeeswg
16 Jul 2018, 04:17
Forum: Ask For Help
Topic: ACC Library, new question.
Replies: 7
Views: 72

Re: ACC Library, new question.

- My function to get text for all elements is the most reliable way to get the correct path.
- [EDIT:] See JEE_AccGetTextAll, here:
Acc: get text from all window/control elements - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40615
by jeeswg
16 Jul 2018, 03:57
Forum: Ask For Help
Topic: ACC Library, new question.
Replies: 7
Views: 72

Re: ACC Library, new question.

- Try accName and accValue.
- The (2) is the child ID, see here:
Using the ACC library - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=52109&p=228690#p228690
by jeeswg
16 Jul 2018, 02:25
Forum: Ask For Help
Topic: ACC Library, new question.
Replies: 7
Views: 72

Re: ACC Library, new question.

To get text from a GUI element, you need to find the right information to pass to the Acc_Get function. There is some info here:
Acc: get text from all window/control elements - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=40615
by jeeswg
15 Jul 2018, 09:20
Forum: Ask For Help
Topic: Using the ACC library
Replies: 4
Views: 90

Re: Using the ACC library

- In Acc.ahk the function is defined like this: Acc_ObjectFromPoint(ByRef _idChild_ := "", x := "", y := "") - So you can specify the coordinates that way, the 2nd and 3rd parameters. Screen coordinates AFAIK (not window/client coordinates). - To understand the child ID...
by jeeswg
15 Jul 2018, 06:17
Forum: Ask For Help
Topic: ENCARTA
Replies: 3
Views: 65

Re: ENCARTA

- I have a function here called JEE_ProcessGetCommandLine: jeeswg's Explorer tutorial - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=31755 - What version of Windows do you have? On Windows 7, if I click on the Processes tab, I can go to 'View, Select Columns...', and 'C...
by jeeswg
15 Jul 2018, 03:16
Forum: Ask For Help
Topic: ENCARTA
Replies: 3
Views: 65

Re: ENCARTA

- Check the shortcut's properties for arguments and a working directory. (You may need to add one or both.) - You can also check the Command Line column in Task Manager. [View, Select Columns...] - E.g. here I've added 2 arguments and a working directory: ;Run, Target [, WorkingDir, Max|Min|Hide|Use...
by jeeswg
15 Jul 2018, 03:09
Forum: Ask For Help
Topic: Using the ACC library
Replies: 4
Views: 90

Re: Using the ACC library

- Try this: Gui, Add, Edit, x5 y5 w490 h25 vedit1 Gui, Add, Edit, x5 y+5 w490 h25 vedit2 Gui, Add, Edit, x5 y+5 w490 h25 vedit3 Gui, Show, w500 h100 return !z:: MouseGetPos, OutX, OutY, OutWin, OutCon id := 0xFFFFFFFC ; OBJID_CLIENT = 0xFFFFFFFC ;oAcc := Acc_ObjectFromWindow(OutWin, id), vChildID :=...
by jeeswg
13 Jul 2018, 20:30
Forum: Ask For Help
Topic: Find and replace bullet points
Replies: 3
Views: 72

Re: Find and replace bullet points

Try this. Cheers. ;tested on Word 2007 q:: ;MS Word - replace bullet points Clipboard := "" SendInput, ^c ClipWait, 3 if ErrorLevel { MsgBox, % "error: failed to retrieve clipboard text" return } vOutput := StrReplace(Clipboard, "`r`n" Chr(8226) "`t", "|*...
by jeeswg
13 Jul 2018, 07:39
Forum: Ask For Help
Topic: Shortcut to copy path of selected file in Explorer Topic is solved
Replies: 4
Views: 87

Re: Shortcut to copy path of selected file in Explorer Topic is solved

- There is always one item (file/folder) that is focused. The item is either selected (highlighted blue) or it is not selected. - I would suppose that the best approach would be to retrieve the path of the focused item if it is selected, or otherwise, to retrieve the path of the folder if the focuse...
by jeeswg
13 Jul 2018, 07:14
Forum: Ask For Help
Topic: Getting the name/number of the current tab in a GUI without having to submit Topic is solved
Replies: 4
Views: 77

Re: Getting the name/number of the current tab in a GUI without having to submit Topic is solved

You could use SendMessage with TCM_GETCURSEL. ;e.g. type one of these into the Run dialog (with AutoHotkey in Admin mode for sysdm.cpl) ;sysdm.cpl ;rundll32 shell32.dll,Options_RunDLL 1 q:: ;tab control - get selected tab index ControlGet, hCtl, Hwnd,, SysTabControl321, A SendMessage, 0x130B,,,, % &...
by jeeswg
13 Jul 2018, 06:59
Forum: Offtopic
Topic: html/websites: resources
Replies: 4
Views: 114

html/websites: resources

- I'm thinking of going back to writing websites. Basically writing html from scratch on each page. Also, html can be useful for doing GUIs. [EDIT: html from scratch + CSS + JavaScript.] - My list of examples so far is simple: w3schools looking at the html for webpages e.g. the AutoHotkey help - I w...
by jeeswg
12 Jul 2018, 23:17
Forum: Ask For Help
Topic: strReplance remove linebreaks
Replies: 3
Views: 78

Re: strReplance remove linebreaks

- Try this perhaps: vText := "a`r`nb`r`nc" MsgBox, % vText vText := StrReplace(vText, "`r`n", ", ") MsgBox, % vText - To investigate the text you can try this: vText := "a`r`nb`r`nc" vText := StrReplace(vText, "`r", "_R") vText := StrReplac...
by jeeswg
12 Jul 2018, 00:39
Forum: Ask For Help
Topic: StrSplit() from right? Topic is solved
Replies: 9
Views: 144

Re: StrSplit() from right? Topic is solved

- Here is some code using SubStr. q:: ;use SubStr to get the last n parts of a string vPath := "E:\Folder 1\Sub Folder 2\Sub Folder 3\Sub Folder 4\picture.png" vNum := 2 vIsV1 := !!InStr(1,1,1,0), vPos := vIsV1 ? -1 : 0 vPos := InStr(vPath, "\", 0, vPos, vNum) MsgBox, % SubStr(vP...
by jeeswg
11 Jul 2018, 22:37
Forum: Ask For Help
Topic: StrSplit() from right? Topic is solved
Replies: 9
Views: 144

Re: StrSplit() from right? Topic is solved

- StrSplit has a MaxParts parameter (since AHK v1.1.28+). E.g. ;StrSplit MaxParts (v1.1.28+) MsgBox, % StrSplit("a,b,c,d,e", ",",, 3)[3] ;c,d,e - You can use that to achieve what you want: q:: ;get the last n array items, joined, via StrSplit MaxParts (v1.1.28+) vPath := "E:...
by jeeswg
11 Jul 2018, 18:52
Forum: Ask For Help
Topic: Just basic code help? Can't figure how to add this face
Replies: 2
Views: 67

Re: Just basic code help? Can't figure how to add this face

Here's an alternative, you wrap the ^ in curly braces to make it literal:

Code: [Select all]GeSHi © Codebox Plus

q::
SendInput, {Enter} :{^}) {Enter}
return

Or as a one-liner:

Code: [Select all]GeSHi © Codebox Plus

q::SendInput, {Enter} :{^}) {Enter}
by jeeswg
11 Jul 2018, 12:41
Forum: Ask For Help
Topic: if check not working as intended
Replies: 7
Views: 128

Re: if check not working as intended

I had these lines for f.lux which may work:

Code: [Select all]GeSHi © Codebox Plus

DetectHiddenWindows, On
if WinExist("f.lux ahk_class ytWindow") ;normal
|| WinExist("F.Lux ahk_class ytWindow") ;portable
MsgBox, % "exists"
else
MsgBox, % "doesn't exist"
by jeeswg
11 Jul 2018, 01:06
Forum: Scripts and Functions
Topic: Explorer: get name of file under cursor
Replies: 6
Views: 204

Re: Explorer: get name of file under cursor

- Add these lines at the top between 'q::' and 'oAcc :='. DetectHiddenWindows, Off if !WinExist("ahk_class #32768") return - This will end the subroutine early if no context menu window is detected. - For Photoshop, which I don't use, I would recommend investigating with AccViewer, try to ...

Go to advanced search