Search found 576 matches

by Odlanir
Today, 14:07
Forum: Ask For Help
Topic: Move window CENTER to mouse postition Topic is solved
Replies: 2
Views: 91

Re: Move window CENTER to mouse postition Topic is solved

Code: Select all

RButton::
coordmode, mouse, screen
mousegetpos, xx, yy
gui, -DPIScale
gui, dialpad:show, x0 y300 w270 h500, dialpad
winmove, dialpad, , % xx-135*(A_ScreenDPI/96), % yy-250*(A_ScreenDPI/96)  
return
by Odlanir
Today, 04:06
Forum: Ask For Help
Topic: CSV-File - search for Text
Replies: 2
Views: 112

Re: CSV-File - search for Text

I would do it this way: FileRead, csvvar, vehicles.csv objcsv := {} Loop, Parse, csvvar, `n, `r { row := A_Index Loop, Parse, A_LoopField, CSV { fld := A_LoopField, cnt := A_Index If( row = 1) { objcsv[fld] := {pos:cnt,values:[]} } else { for k, v in objcsv if (v.pos = cnt) objcsv[k].values.push(fld...
by Odlanir
Today, 03:35
Forum: Ask For Help
Topic: how to randomly select a fixed number of files in the current directory in windows explorer using a shortcut key
Replies: 11
Views: 290

Re: how to randomly select a fixed number of files in the current directory in windows explorer using a shortcut key

.... but I don't know how to configur theme to my needs Try this: +^1:: +^2:: +^3:: +^4:: +^7:: keys := {1:1,2:25,3:35,4:40,7:70} choice := keys[SubStr(A_ThisHotkey,3)] str := sellist := "" loop, Files, % JEE_ExpWinGetDir() "\*.*", F ; loops in current explorer folder str .= A_LoopFilename "`n" sor...
by Odlanir
12 Jan 2020, 11:19
Forum: Ask For Help
Topic: Remove error message when trying to open file that dont exist
Replies: 3
Views: 132

Re: Remove error message when trying to open file that dont exist

You can use try

Code: Select all

try
   run, c:\nonexistingname.png
also your use of FileExist is incorrect. Should be:

Code: Select all

FileExist("C:\xxxxxxxx\xxxxxx\" clipboard ".png")
by Odlanir
12 Jan 2020, 06:26
Forum: Ask For Help
Topic: An AutoHotKey Script Request Topic is solved
Replies: 2
Views: 125

Re: An AutoHotKey Script Request Topic is solved

This could help ?
Please note that you lose the ability to digit the c char, Press Esc to exit the script.

Code: Select all

~c::   
   Mode := (flag := !flag) ? "1000" : "Off"
   SetTimer, cSpammer, %Mode%
return

cSpammer:
   send, c
return   
*Esc::
   ExitApp
by Odlanir
11 Jan 2020, 13:32
Forum: Ask For Help
Topic: How to store arrays in the object (syntax) Topic is solved
Replies: 2
Views: 146

Re: How to store arrays in the object (syntax) Topic is solved

Code: Select all

dictionary := {"Array1" : [1,2,3,4,5] , "Array2" : [6,7,8,9,10] , "Array3" : [11,12,13,14,15]}
by Odlanir
11 Jan 2020, 06:33
Forum: Ask For Help
Topic: How to get the total number of processes with the same name? Topic is solved
Replies: 3
Views: 130

Re: How to get the total number of processes with the same name? Topic is solved

Some like this ? Gui, Add, listview , w1000 h300,Name|Cmdline|Pid for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process where CommandLine like '%autohotkey%'") { pNam := process.Name pCom := process.CommandLine pPid := process.ProcessId lv_add("", pNam, pCom, pPid) } LV_Modify...
by Odlanir
04 Jan 2020, 06:00
Forum: Ask For Help
Topic: Excel display row Topic is solved
Replies: 2
Views: 180

Re: Excel display row Topic is solved

Some like this ?

Code: Select all

LookFor := "John"
FilePath :=  A_ScriptDir "\Book1.xlsx"
oWorkbook := ComObjGet(FilePath)
WB  := oWorkbook.Sheets("Week1")

if (Row := WB.Range("B:E").Find(LookFor).Row) {
	WB.Range("H" Row ":K" Row).Copy
    MsgBox % Clipboard
    oWorkbook.Application.CutCopyMode := False
}    
by Odlanir
01 Jan 2020, 06:46
Forum: Ask For Help
Topic: Is it Possible to Wrap Text in ListView?
Replies: 2
Views: 163

Re: Is it Possible to Wrap Text in ListView?

Is just a workaround but it works for me: Gui, -DPIScale RowHeight := 150 ; you can play with this value ( 150 pixels is the minumum to produce wrap in my environment ) Gui, Add, ListView, w700 r10, Data|Values LV_ModifyCol(1,300) LV_ModifyCol(2,"200 Integer") Loop 100 { Random, rnd, 1, 999999 rw :=...
by Odlanir
27 Dec 2019, 09:15
Forum: Ask For Help
Topic: queastion about excel.Sheets.Add Topic is solved
Replies: 1
Views: 109

Re: queastion about excel.Sheets.Add Topic is solved

Code: Select all

excel:= ComObjActive("Excel.Application")
excel.Sheets.Add(,excel.WorkSheets[3])
by Odlanir
27 Dec 2019, 09:10
Forum: Ask For Help
Topic: Add Multiple Data in Single ListView Topic is solved
Replies: 3
Views: 198

Re: Add Multiple Data in Single ListView Topic is solved

Or, using an Array: Gui Add, ListView, x5 y5 w1000 h500, Data1|Data2 lst := [] Loop,%A_Desktop%\*.* lst[A_Index,1] := A_LoopFileName Loop,%A_MyDocuments%\*.* lst[A_Index,2] := A_LoopFileName Loop, % lst.MaxIndex() { LV_Add("",lst[A_Index]*) } LV_ModifyCol() Gui, Show Return GuiEscape: GuiClose: Exit...
by Odlanir
27 Dec 2019, 04:39
Forum: Ask For Help
Topic: Excel Select cell range
Replies: 5
Views: 250

Re: Excel Select cell range

Press k to select the cells, esc to exit:

Code: Select all

k::
xl := ComObjActive("Excel.Application")
if ( xl.Activecell.Column = 1 ) 
	xl.range(xl.Activecell, xl.Activecell.offset(96,4)).Select
else
	xl.range(xl.cells(xl.Activecell.row,1), xl.cells(xl.Activecell.row+96,5)).Select
xl := ""
return

*Esc::
	ExitApp
by Odlanir
25 Dec 2019, 16:00
Forum: Ask For Help
Topic: Sort list of file paths in folder\subfolders order Topic is solved
Replies: 6
Views: 465

Re: Sort list of file paths in folder\subfolders order Topic is solved

Code: Select all

list =
(
c:\folder a\wfbt.txt
c:\folder c\blah.txt
c:\folder b\terp.txt
c:\folder b\subfolder c\phbt.txt
c:\folder a\subfolder a\hfbt.txt
)
Sort, List
MsgBox % list
by Odlanir
23 Dec 2019, 13:15
Forum: Ask For Help
Topic: date to increase by one day every loop Topic is solved
Replies: 3
Views: 208

Re: date to increase by one day every loop Topic is solved

Gui, -MinimizeBox -MaximizeBox +hwndGuiID Gui, Add, Text,, Start date: Gui, Add, MonthCal, vStartCal Gui, Add, Text,, End date: Gui, Add, MonthCal, vEndCal Gui, Add, Button, gAcceptBtn, Accept dates and continue Gui, Show,, Get Dates AcceptBtn: Gui, Submit, NoHide Loop { MsgBox % thisdate := SubStr...
by Odlanir
21 Dec 2019, 07:55
Forum: Ask For Help
Topic: Script icon doesn't work Topic is solved
Replies: 12
Views: 406

Re: Script icon doesn't work Topic is solved

Sure?
prtscreen.png
prtscreen.png (53.52 KiB) Viewed 367 times
by Odlanir
21 Dec 2019, 07:15
Forum: Ask For Help
Topic: GUI, change text tab Topic is solved
Replies: 1
Views: 93

Re: GUI, change text tab Topic is solved

Code: Select all

Gui, Add, Tab2, vTab , % tabnames := "AAA|BBB|CCC"
Loop 3
   Gui, Tab, % A_Index
gui, show
return

space::
Gui, Submit, NoHide
GuiControlGet, ThisTab,, Tab
GuiControl,Text,Tab,% "|" RegExReplace(tabnames, ThisTab,"CurrentTab")
return
by Odlanir
21 Dec 2019, 06:53
Forum: Ask For Help
Topic: Script icon doesn't work Topic is solved
Replies: 12
Views: 406

Re: Script icon doesn't work Topic is solved

Try this

Code: Select all

Menu, tray, Icon , 01.ico
gui, destroy ; The Destroy & Show are needed to allow the new icon to be used in gui.
gui, show, w200 h300
return
by Odlanir
21 Dec 2019, 06:39
Forum: Ask For Help
Topic: Excel - Geting value from current row and certain column
Replies: 2
Views: 153

Re: Excel - Geting value from current row and certain column

Code: Select all

#If WinActive("Excel" ahk_class XLMAIN) 
^Enter::
xl := ComObjActive("Excel.Application")
   Clipboard := xl.cells(xl.ActiveCell.Row,1).Text
xl := ""
return
#if
by Odlanir
19 Dec 2019, 08:49
Forum: Ask For Help
Topic: RegexReplace: <newline> and, or, if, but.
Replies: 4
Views: 135

Re: RegexReplace: <newline> and, or, if, but.

Code: Select all

string=
(
Mom and dad both went to the store and
My sister likes to play videogames but
It's very hard to tell the difference if
If you win, we can go to the movies or
)

MsgBox % RegexReplace(string, "m`a)(and$|or$|if$|but$)", "`r$1" )  
by Odlanir
18 Dec 2019, 12:43
Forum: Ask For Help
Topic: date to increase by one day every loop Topic is solved
Replies: 3
Views: 208

Re: date to increase by one day every loop Topic is solved

Gui, -MinimizeBox -MaximizeBox +hwndGuiID Gui, Add, Text,, Start date: Gui, Add, MonthCal, vStartCal Gui, Add, Text,, End date: Gui, Add, MonthCal, vEndCal Gui, Add, Button, gAcceptBtn, Accept dates and continue Gui, Show,, Get Dates return AcceptBtn: Gui, Submit Gui,Destroy Loop { MsgBox % thisdat...

Go to advanced search