Search found 370 matches

by Odlanir
15 Dec 2017, 06:49
Forum: Ask For Help
Topic: How to get a semi transparent windowless popup?
Replies: 4
Views: 467

Re: How to get a semi transparent windowless popup?

First of all I suggest you to read the AHK manual wich will give you almost all the answers to your questions. 1. how do I have a timer and make it disappear after x seconds? Just put settimer in your script. Doing so you should also code a way to reshow the hidden gui. Some like this: settimer, NoS...
by Odlanir
14 Dec 2017, 06:57
Forum: Ask For Help
Topic: Gui and MosGetPos
Replies: 8
Views: 463

Re: Gui and MosGetPos

Try this: Gui, Add, edit, x10 y010 vx1 Gui, Add, edit, x10 y035 vy1 Gui, Add, edit, x10 y080 vx2 Gui, Add, edit, x10 y105 vy2 Gui, Add, Radio , x10 y60 Checked gRadio, Radio1 Gui, Add, Radio , x10 y130 gRadio, Radio2 Gui,show, w200 h200 rd:=1 F2:: CoordMode ,Mouse,Relative MouseGetPos get_mousex, ge...
by Odlanir
13 Dec 2017, 14:08
Forum: Ask For Help
Topic: Loop through clip board lines and manipulate text Topic is solved
Replies: 5
Views: 353

Re: Loop through clip board lines and manipulate text Topic is solved

Code: Select all

Loop, parse, clipboard, `n, `r
{	
	str .= RegExReplace(A_loopfield,"[\\/:*?""<>|]") ",`n"
}
MsgBox % SubStr(str,1,-2) ; to eliminate the last comma and the last newline
Return
by Odlanir
11 Dec 2017, 13:12
Forum: Ask For Help
Topic: Swap the location of the words from clipboard Topic is solved
Replies: 16
Views: 1050

Re: Swap the location of the words from clipboard Topic is solved

Maybe this ? ^v::addAndSwap() ^+v::addAndSwap() addAndSwap() { if RegExMatch(Clipboard, "s)(.*?)(\d+)(.*)", m) { lm2 := strlen(m2) Clipboard := m1 . Format("{:0" lm2 "}", m2+1) . m3 if InStr(A_ThisHotkey, "+") { If RegExMatch(Clipboard , "O)^(.*?\d+\.\s*)(.+) vs (.+)$", Match) Clipboard := Match[1] ...
by Odlanir
11 Dec 2017, 09:29
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 975

Re: Count how many times a script has been run + loop through

#SingleInstance, force #Persistent #NoEnv SetBatchLines, -1 SetWinDelay, -1 SetTitleMatchMode 2 NetworkFolder := "C:\temp\tmp" ; <----- Change to suit your network folder loop, % NetworkFolder "\*.txt" { scrName := RegExReplace(A_LoopFileName, "^(.*)_.*_.*", "$1") scrList .= scrName "`n" } sort, sc...
by Odlanir
10 Dec 2017, 04:07
Forum: Ask For Help
Topic: Swap the location of the words from clipboard Topic is solved
Replies: 16
Views: 1050

Re: Swap the location of the words from clipboard Topic is solved

Tested and working. ^v::addAndSwap() ^+v::addAndSwap() addAndSwap() { if RegExMatch(Clipboard, "s)(.*?)(\d+)(.*)", m) { lm2 := strlen(m2) Clipboard := m1 . Format("{:0" lm2 "}", m2+1) . m3 if InStr(A_ThisHotkey, "+") { If RegExMatch(Clipboard , "O)^(.*?\d+\.\s*)(.+) vs (.+)$", Match) Clipboard := Ma...
by Odlanir
09 Dec 2017, 13:08
Forum: Ask For Help
Topic: Swap the location of the words from clipboard Topic is solved
Replies: 16
Views: 1050

Re: Swap the location of the words from clipboard Topic is solved

^v:: ; shortcut for the script { ; Insert Incremented text into the clipboard clip := Clipboard if RegExMatch(clip, "s)(.*?)(\d+)(.*)", m) { ;delete "?" to increment numbers at the end lm2 := strlen(m2) ; calculates the length of the number in the copied text (i.e., 005 = 3 & 5 = 1) Clipboard := m1...
by Odlanir
08 Dec 2017, 04:34
Forum: Ask For Help
Topic: How to get a semi transparent windowless popup?
Replies: 4
Views: 467

Re: How to get a semi transparent windowless popup?

#SingleInstance, force #Persistent #NoEnv SetBatchLines, -1 SetWinDelay, -1 SetTitleMatchMode 2 OnMessage(0x0201, "WM_LBUTTONDOWN") gui, -caption +AlwaysOnTop gui, margin,10,5 gui,color, E4C2B4 gui,add,edit,r5 w200 +HwndEId, % "line#1`nline#2`nline#3`nline#4`nline#5" gui,add,Button,vBut1 w200 gBut,...
by Odlanir
05 Dec 2017, 09:36
Forum: Ask For Help
Topic: Sort INIwrite sections by date?
Replies: 5
Views: 430

Re: Sort INIwrite sections by date?

Some like this ? IniRead, OutputVarSectionNames, tempini.ini Loop, Parse, OutputVarSectionNames, `n, `r { out .= "" NormalizeDate(A_LoopField,"mdy") . "," . "" A_LoopField "" . "," } oarray := Object(StrSplit(substr(out, 1, -1), ",")*) FileDelete, tempini_sorted.ini for key,val in Oarray { IniRead, ...
by Odlanir
28 Nov 2017, 13:14
Forum: Ask For Help
Topic: Press 2 keys sequence automatically, every minute on the minute
Replies: 4
Views: 271

Re: Press 2 keys sequence automatically, every minute on the minute

Some like this? #SingleInstance, force #Persistent RunMinute := 11, Delay := 5 ; will run every hour at minute 11 and send 0 and after 5 seconds send space SecsToRun := ( RunMinute-A_Min + ( RunMinute <= A_Min ) * 60 ) * 60 - A_sec SetTimer, RunTime, % SecsToRun * 1000 return RunTime: SetTimer, RunT...
by Odlanir
28 Nov 2017, 07:47
Forum: Ask For Help
Topic: Press 2 keys sequence automatically, every minute on the minute
Replies: 4
Views: 271

Re: Press 2 keys sequence automatically, every minute on the minute

Code: Select all

#SingleInstance, force
#Persistent
SetTimer, 2min, 120000
return
2min:
   send 0{Space}   
return
by Odlanir
27 Nov 2017, 07:04
Forum: Ask For Help
Topic: Ini read and output the Key name that has largest amount Topic is solved
Replies: 16
Views: 1552

Re: Ini read and output the Key name that has largest amount Topic is solved

Code: Select all

IniRead, allSect, myIni.ini, INFO
maxValue := 0
loop, parse, allSect, `n
{
   RegExMatch(a_loopfield, "O)(.*)=(.*)",v)
   if ( v[2] > maxValue ) 
      maxValue := v[2], key := v[1]
}
MsgBox % "The key " key "`nHolds the max value : " maxValue
by Odlanir
23 Nov 2017, 08:21
Forum: Ask For Help
Topic: Paste data in field and use it Topic is solved
Replies: 2
Views: 177

Re: Paste data in field and use it Topic is solved

You have also named the HVND var for the two edit controls with the same name. Correct it. Even if you don't use any HWND in your script. I suggest also to put a return after every subroutine. This should work. Insert: Gui, Submit, NoHide ; <------------------ Insert this in your subroutine FileDele...
by Odlanir
22 Nov 2017, 10:03
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 975

Re: Count how many times a script has been run + loop through

Some like this ? Really basic but should give you a starting point. #SingleInstance, force #Persistent #NoEnv SetBatchLines, -1 SetWinDelay, -1 SetTitleMatchMode 2 NetworkFolder := "C:\temp\tmp" ; <----- Change to suit your network folder loop, % NetworkFolder "\*.txt" { userName := RegExReplace(A_L...
by Odlanir
21 Nov 2017, 18:14
Forum: Ask For Help
Topic: RegEx to Match Expression With Quotation Marks
Replies: 19
Views: 1383

Re: RegEx to Match Expression With Quotation Marks

Your sample is not correct. Try with a file. FileRead, text, test99.txt ; <--- 10MB file RegExMatch(text, """videoId"".*?""(.*?)""", Matched) strx := "User example : `n`nMatched`t" Matched "`nMatched1`t" Matched1 "`n`n" RegExMatch(text, "OmU).*videoId"":\s*?""(.*)"".*?", out) strx .= "Odlanir exampl...
by Odlanir
21 Nov 2017, 13:20
Forum: Ask For Help
Topic: RegEx to Match Expression With Quotation Marks
Replies: 19
Views: 1383

Re: RegEx to Match Expression With Quotation Marks

User wrote: The @Odlanir example is not very suitable because regex must match all the text in order to get (KhmrdFsY6Ls)! (if your original text is too large, it may cause regex limit errors!) @User: Are you sure ? I've tested my RegEx with a 10MB file and I've found any problem, it performed exact...
by Odlanir
21 Nov 2017, 04:30
Forum: Ask For Help
Topic: RegEx to Match Expression With Quotation Marks
Replies: 19
Views: 1383

Re: RegEx to Match Expression With Quotation Marks

Some like this ?

Code: Select all

text =
(
"nextPageToken": "CAEQAA",
"regionCode": "US",
"videoId": "KhmrdFsY6Ls"
"pageInfo": {
"totalResults": 245,
"resultsPerPage": 1
)

RegExMatch(text, "OmU).*videoId"":\s*?""(.*)"".*?", out)
MsgBox % out[1]
by Odlanir
20 Nov 2017, 05:41
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 975

Re: Count how many times a script has been run + loop through

Another way to accomplish the task. To avoid concurrent update of a common file for all the network users I'll do this way. Every time a script is executed it writes ( or renames ) ,in a common network folder, a filename with the following format: scriptname_username_count.txt containing the executi...
by Odlanir
17 Nov 2017, 06:46
Forum: Ask For Help
Topic: parse text
Replies: 6
Views: 623

Re: parse text

Code: Select all

filename := "SUV5 Newbell, Trillia score v1 (CHAPAV186n.2 Dream Time).wav"
MsgBox % RegExReplace(filename, ".*\((.*)\).*","$1")

Go to advanced search