Search found 71 matches

by aifritz
02 May 2019, 01:02
Forum: Ask For Help
Topic: fix an error with a script Topic is solved
Replies: 3
Views: 110

Re: fix an error with a script Topic is solved

Hi Way2000, it adds extra letters to lines for no reason. It actually adds the last letter of the previous entry (line) Exactly this line leads to the described behavior ;) FileObj.Write(SubStr(FileContent, Pos + Len)) ... the vars Pos+Len are nowhere defined, so they are empty and interpreted as 0 ...
by aifritz
01 May 2019, 12:53
Forum: Ask For Help
Topic: please help to improve my scripts for Ctrl and Alt key toggle Topic is solved
Replies: 2
Views: 80

Re: please help to improve my scripts for Ctrl and Alt key toggle Topic is solved

Hi zechskoh,
you are welcome :)

Code: Select all

*F9::
KeyDown := !KeyDown
If KeyDown {
	ToolTip LCtrl+LAlt Down
	SendInput {LCtrl down}
	SendInput {LAlt down}
	}
Else{
	ToolTip
	SendInput {LCtrl up}
	SendInput {LAlt up}
	}
Return
by aifritz
01 May 2019, 12:34
Forum: Ask For Help
Topic: How to detect current character in the PowerShell
Replies: 1
Views: 62

Re: How to detect current character in the PowerShell

Hi Willh, here one approach, but it has not been tested very intensively :) ^w:: KeyWait, w, L KeyWait, LCtrl, L YPos := A_CaretY Loop { Send ^+{Left} If (YPos != A_CaretY) { Sleep 50 Send ^+{Right} ;unmark, when cursor is no longer in same row break } ClipBoard := "" Send ^c ClipWait 1.0 If InStr(R...
by aifritz
03 Mar 2019, 11:56
Forum: Ask For Help
Topic: AHK: FileExist Topic is solved
Replies: 2
Views: 165

Re: AHK: FileExist Topic is solved

I think it does not work with fileexist.

Here an other approach:

Code: Select all

Loop, % A_Desktop "\*.xlsx"
	{
		If InStr(A_LoopFileName, "yes")
			continue
		ToolTip % A_LoopFileName
		Sleep 2000
	}
by aifritz
03 Mar 2019, 11:26
Forum: Scripts and Functions
Topic: AutoHotkey: how to restart the script when the ctrl control key is stuck
Replies: 1
Views: 228

Re: AutoHotkey: how to restart the script when the ctrl control key is stuck

This code works for me quite good: It checks the left and right Ctrl key and releases it, if key was down GetKeyState,stateL,LCtrl GetKeyState,stateP,LCtrl, P if (stateL <> stateP) Send,{LCtrl Up} GetKeyState,stateL,RCtrl GetKeyState,stateP,RCtrl, P if (stateL <> stateP) Send,{RCtrl Up}
by aifritz
02 Feb 2019, 04:37
Forum: Ask For Help
Topic: Replacing áéíóúâôûë accented characters Topic is solved
Replies: 10
Views: 584

Re: Replacing áéíóúâôûë accented characters Topic is solved

Only to mention, in German language:
ä -> ae
ö -> oe
ü -> ue
ß -> ss
by aifritz
26 Jan 2019, 12:22
Forum: Skripte und Funktionen
Topic: Flexibler Autofilter für Excel
Replies: 1
Views: 852

Re: Flexibler Autofilter für Excel

Hi, kleine Verbesserung: Falls bereits ein Autofilter nicht für alle Spalten gesetzt ist, klappt es so besser: col := xl.ActiveCell.Column - xl.ActiveSheet.Autofilter.Range.Column + 1 ;ermittelt die Spalte falls ein Autofilterbereich existiert wo der Filter gesetzt/gelöscht werden soll If (col = "")...
by aifritz
14 Jan 2019, 15:12
Forum: Ask For Help
Topic: Does a file belong to/originate from a folder
Replies: 4
Views: 268

Re: Does a file belong to/originate from a folder

What about upper case / lowercase: do I first bring both paths to either of the two, to be able to compare in an alphanumeric way ? This is not necessary, cause ("aaa" = "AAA") is true. Upper/lowercase is only relevant, when you compare it this way ("aaa" == "AAA") is false. Also, if one of them st...
by aifritz
14 Jan 2019, 14:13
Forum: Ask For Help
Topic: Grouping Excel Pivot Table by month and year
Replies: 7
Views: 419

Re: Grouping Excel Pivot Table by month and year

Many thanks to all!! Only with your help could I get it to work :D :D :D It's important here to use VT_Bool instead of VT_VARIANT and the commas must be set in the Group method! (true and -1 work both) MyArray := ComObjArray(0xB, 7) ;0xB => VT_Bool MyArray[0] := false ;element 1 indicates the Period...
by aifritz
14 Jan 2019, 10:13
Forum: Ask For Help
Topic: Grouping Excel Pivot Table by month and year
Replies: 7
Views: 419

Re: Grouping Excel Pivot Table by month and year

Hi Xeo786, rngGroup.cells(1).Group.Periods := Array(False, False, False, False, True, False, True)` This brings no error, but grouping doesn't work (still only for months) :? Here the test-scenario in Excel: You just need two columns with the titles "Date" column A and "VArt" Column B in Sheet1 Date...
by aifritz
14 Jan 2019, 06:00
Forum: Ask For Help
Topic: Grouping Excel Pivot Table by month and year
Replies: 7
Views: 419

Re: Grouping Excel Pivot Table by month and year

Hi Xeo786, thank you for your input :) ;~ expression. Group( _Start_ , _End_ , _By_ , _Periods_ ) rngGroup.cells(1).Group(,,,MyArray) Using the code above, leads for me again to the error: Error: 0x800A03EC - Source: Microsoft Excel Description: The Group property of the Range object cannot be assig...
by aifritz
14 Jan 2019, 04:40
Forum: Ask For Help
Topic: Grouping Excel Pivot Table by month and year
Replies: 7
Views: 419

Re: Grouping Excel Pivot Table by month and year

With the help of this site http://www.globaliconnect.com/excel/index.php?option=com_content&view=article&id=153:excel-pivot-tables-grouping-group-items-group-data-and-group-date-values-using-vba&catid=79&Itemid=475 it throws no error anymore, but grouping by years is still ignored :roll: Any ideas a...
by aifritz
13 Jan 2019, 14:00
Forum: Ask For Help
Topic: Does a file belong to/originate from a folder
Replies: 4
Views: 268

Re: Does a file belong to/originate from a folder

This could be done for e.g. with the help of SplitPath:

https://autohotkey.com/docs/commands/SplitPath.htm
by aifritz
13 Jan 2019, 12:21
Forum: Ask For Help
Topic: Grouping Excel Pivot Table by month and year
Replies: 7
Views: 419

Grouping Excel Pivot Table by month and year

Hi together, I'm trying to group data in an excel Pivot Table by month and year. This ahk-code is working and groups only by month: ... xl.Range("A8").Group(1) ... but how does it work, grouping by month and year!? This is the code from Excel macro recorder which works, when I run the vba code to do...
by aifritz
04 Jan 2019, 13:58
Forum: Ask For Help
Topic: While WinActive issue Topic is solved
Replies: 4
Views: 213

Re: While WinActive issue Topic is solved

The problem is, that your code a.) is placed in the autoexecute section. This runs once, when you start your script. Normally this section had to be finished with the return statement Look here: https://autohotkey.com/docs/Scripts.htm#auto b.) when the Word document is not active anymore, the while ...
by aifritz
04 Jan 2019, 13:01
Forum: Ask For Help
Topic: While WinActive issue Topic is solved
Replies: 4
Views: 213

Re: While WinActive issue Topic is solved

Hi Lukikov,
when you use the function of winactive, it is working as expected :)

Code: Select all

SetTitleMatchMode 2

While WinActive("xyz")
{
    if GetKeyState("Up") 
        Send, {Down}        
}
by aifritz
03 Jan 2019, 13:28
Forum: Ask For Help
Topic: Press and release a key button to start/stop script
Replies: 2
Views: 211

Re: Press and release a key button to start/stop script

I do not understand exacly want you want to do with this script. :problem: This code moves the mouse down and when you release LCtrl brings it back to the starting position. LCtrl:: mousegetpos, mouseX, mouseY while(GetKeyState("LCtrl","P")) { sleep 12 mouseXY(5,4) } MouseMove, mouseX, mouseY,0 ;mov...
by aifritz
03 Jan 2019, 12:21
Forum: Ask For Help
Topic: USB Barcode Capture Revisited
Replies: 20
Views: 844

Re: USB Barcode Capture Revisited

not quite sure what it's supposed to be exactly for and if A_TimeSincePriorHotkey works as expected, but if you only want to make it possible for other chars you could try something like this, there might be a better solution... :) #SingleInstance force Chars = 0123456789abcdefghijklmnopqrstuvwxyzAB...
by aifritz
03 Jan 2019, 11:10
Forum: Ask For Help
Topic: is there a kind of IfNotWinGetPos ? Topic is solved
Replies: 2
Views: 163

Re: is there a kind of IfNotWinGetPos ? Topic is solved

Hi AmDeG, for me it seems so as there is something wrong in this part: IfWinExist Cross-references window ;moves to correct area { WinActivate Cross Version Search Results WinMove Cross Version Search Results,,2121,0,801,2100 WinActivate Cross Version Search Results } When you ask for "IfWinExist Cr...

Go to advanced search