Search found 205 matches

by aifritz
12 Feb 2020, 02:03
Forum: Ask For Help
Topic: why wont my script just stop
Replies: 7
Views: 285

Re: why wont my script just stop

Code: Select all

...
ExitApp
Return
Insert an ExitApp command before return.

Btw. ";F3::" is commented out, means your script is starting at once when you run it.
by aifritz
11 Feb 2020, 01:52
Forum: Ask For Help
Topic: AUTOHOTKEY AND SUPERPUTTY
Replies: 5
Views: 208

Re: AUTOHOTKEY AND SUPERPUTTY

Have you checked the title and class in Superputty?
Only an idea...
You also can combine title and class in one command like this.

Code: Select all

If WinExist("x.x.x.x - SuperPuTTY ahk_class SuperPuTTY")
Perhaps have also a view on the SetTitleMatchMode command...
by aifritz
09 Feb 2020, 13:20
Forum: Ask For Help
Topic: need help with a code
Replies: 1
Views: 137

Re: need help with a code

Yes, you could try it for e.g. with controlgettext

https://www.autohotkey.com/docs/commands/ControlGetText.htm

Code: Select all

^t:: ;Press Ctrl+t to read the text from an open notepad window, which must not be active
ControlGetText, MyText, Edit1, ahk_class Notepad
msgbox % MyText
return
by aifritz
09 Feb 2020, 13:06
Forum: Pedir Ayuda
Topic: problema con un atajo de teclado pulsando alt mas ,
Replies: 7
Views: 203

Re: problema con un atajo de teclado pulsando alt mas ,

This for AltGr...

Code: Select all

<^>!,::
keywait, RAlt
send {LShift down}{F10}{LShift up}
return
by aifritz
09 Feb 2020, 12:43
Forum: Ask For Help
Topic: AUTOHOTKEY AND SUPERPUTTY
Replies: 5
Views: 208

Re: AUTOHOTKEY AND SUPERPUTTY

You could debug your script by double click on to the ahk trayicon. Here you see the most recently executed lines.
Another way is inserting msgboxes before or after your if your if-statments to check the results...
by aifritz
02 Feb 2020, 05:22
Forum: Ask For Help
Topic: Help trying to make this work, stopping key spam after conditions are met.
Replies: 3
Views: 114

Re: Help trying to make this work, stopping key spam after conditions are met.

seams so as I don't understand, what you exactly want. Perhaps a tooltip helps to see, what the status is. The Sleep 1000 command means also, that you had to hold the mouse for min. 1 sec. to a position <= 960 to set the var z to false again. F3:: z := false Loop { MouseGetPos, X, Y tooltip x:%x% z:...
by aifritz
02 Feb 2020, 02:34
Forum: Ask For Help
Topic: Help trying to make this work, stopping key spam after conditions are met.
Replies: 3
Views: 114

Re: Help trying to make this work, stopping key spam after conditions are met.

In this way?

Code: Select all


F3::
z := false
Loop
{
  MouseGetPos, X, Y
  if (x > 960 And !z)
    {
      Send {``}
      z := true
    }
  Else if (x<=960)
     z := false
  Sleep, 1000
}
return
by aifritz
28 Jan 2020, 15:15
Forum: Ask For Help
Topic: Pause timers when script paused
Replies: 6
Views: 246

Re: Pause timers when script paused

A_TickCount counts the number of milliseconds that have elapsed since the system was started,
with pause you do not stop your computer-clock.

But pause stops the timer as you can see here:

Code: Select all

x := 0
SetTimer, check, 500
return

check:
x++
tooltip %x%
return

f1::
Pause::Pause
return
by aifritz
25 Jan 2020, 09:20
Forum: Ask For Help
Topic: Foreground active control to background active controls
Replies: 5
Views: 243

Re: Foreground active control to background active controls

Hi blad4, ; is below click to manually focus? click Normally you could use the prefix "~" for hotkeys, means when the hotkey fires, its key's native function will not be blocked. I don't know why, but in this case using the prefix wasn't working correct for me, so the click was a workaround. ; can b...
by aifritz
25 Jan 2020, 09:19
Forum: Ask For Help
Topic: Foreground active control to background active controls
Replies: 5
Views: 243

Re: Foreground active control to background active controls

Hi blad4, ; is below click to manually focus? click Normally you could use the prefix "~" for hotkeys, means when the hotkey fires, its key's native function will not be blocked. I don't know why, but in this case using the prefix wasn't working correct for me, so the click was a workaround. ; can b...
by aifritz
23 Jan 2020, 06:21
Forum: Ask For Help
Topic: Noob question Topic is solved
Replies: 4
Views: 191

Re: Noob question Topic is solved

Code: Select all

;sorting example:
Berlin:=55
Paris:=444
Madrid:=3939
a := Berlin "`n" Paris "`n" Madrid
Sort, a, N
msgbox % "|" a "|"
by aifritz
22 Jan 2020, 14:36
Forum: Ask For Help
Topic: Foreground active control to background active controls
Replies: 5
Views: 243

Re: Foreground active control to background active controls

I played a bit around with your code. Not shure if I understand you... This script sends 1 to all open Notepad windows, when you click in Edit1 control in one of them. But click & drag to move the win is not working any longer. The additional ControlClick and ControlFocus is not necessary for my exa...
by aifritz
22 Jan 2020, 12:55
Forum: Ask For Help
Topic: Noob question Topic is solved
Replies: 4
Views: 191

Re: Noob question Topic is solved

here some alternatives a := "360 /km2 (980 / sq mi)" msgbox % "|" Trim(StrSplit(a, "/")[1]) "|" ;with / as seperator, needs Trim to get the number without space at the end msgbox % "|" StrSplit(a, " ")[1] "|" ;with space as seperator regexMatch(a, "^(\d{3}).*", MyNumber) ; ^=when number always occur...
by aifritz
17 Jan 2020, 11:55
Forum: Ask For Help
Topic: Windows start time and shoot down time Topic is solved
Replies: 2
Views: 148

Re: Windows start time and shoot down time Topic is solved

You could give ahk a chance with this script ;) #Persistent Global LogStartExit := A_ScriptDir "\LogStartExit.txt" ;When starting FormatTime, TimeStamp, %LongDate%, dd.MM.yyyy, HH:mm:ss FileAppend, %TimeStamp%: StartTime`r`n, %LogStartExit% OnExit("MyExit") ;When exit or shutdown return MyExit(Reaso...
by aifritz
17 Jan 2020, 11:00
Forum: Ask For Help
Topic: Win 10 Apps from Start Menu
Replies: 1
Views: 110

Re: Win 10 Apps from Start Menu

The best way to get fast help, is posting your code, which is not working :)
by aifritz
17 Jan 2020, 10:53
Forum: Ask For Help
Topic: CSV-File - search for Text
Replies: 3
Views: 206

Re: CSV-File - search for Text

Do you mean somethoing like this?

Code: Select all

Vehicle := "Car,Bike,Ship"
Field := StrSplit(Vehicle, ",")
For Col, value in Field
	Msgbox % "Column: " Col "`nValue: " value 
by aifritz
17 Jan 2020, 10:42
Forum: Ask For Help
Topic: COM Interface calls to Excel fail randomly. Try?
Replies: 7
Views: 427

Re: COM Interface calls to Excel fail randomly. Try?

Here a version, after 10 tries comes a msgbox, asking to try again X1 := ComObjCreate( "Excel.Application" ), X1.Visible := True i := 0 Loop { i++ try { X1.Sheets(NEXT_SHEET).Range( "A1:A15" ).Copy break ;success } catch e { If (i = 10) { msgbox,4097,,% e.message "`n`nTry again?" ifmsgbox, cancel br...
by aifritz
17 Jan 2020, 10:22
Forum: Ask For Help
Topic: Sending %A_Index% values without hard-coding them into script Topic is solved
Replies: 3
Views: 212

Re: Sending %A_Index% values without hard-coding them into script Topic is solved

Here 3 approaches via pseudo array ;slow version While % IDArr%A_index% send % "c:\myfile\parent\" IDArr%A_index% "`n" ; faster version ClipBoard := "" While % IDArr%A_index%{ ClipBoard .= "c:\myfile\parent\" IDArr%A_index% "`n" Send ^v } ;ultra fast version ClipBoard := "" While % IDArr%A_index% Cl...
by aifritz
17 Jan 2020, 00:42
Forum: Ask For Help
Topic: Shortcut key for Menu not working
Replies: 4
Views: 262

Re: Shortcut key for Menu not working

I must contradict you ;) -> The hotkey ^h:: did it.

Afterwards I thought you meant that if the menu is active then the hotkey can't be triggered: This is actually the case and I don't think it can be fixed :roll:

Go to advanced search