Search found 336 matches

by Odlanir
Today, 04:47
Forum: Ask For Help
Topic: Is there a way to adjust the alignment of the DropDownList item?
Replies: 4
Views: 133

Re: Is there a way to adjust the alignment of the DropDownList item?

@afe You're right! Seems I've misunderstood your request. But what you mean by vertical alignment?
by Odlanir
Yesterday, 13:43
Forum: Ask For Help
Topic: Is there a way to adjust the alignment of the DropDownList item?
Replies: 4
Views: 133

Re: Is there a way to adjust the alignment of the DropDownList item?

Gui, font,,Courier Gui, Add, DropDownList, w300 hwndDDL vColorChoice, % SpaceItems("Black|White|Red|Green|Blue") PostMessage, 0x153, 0, 30,, ahk_id %DDL% Gui, Show, h300 w400 return SpaceItems(items) { for each, item in StrSplit(items, "|") { lng := StrLen(item) str .= Format("{:-" 17-lng/2 "}{}","...
by Odlanir
10 Jun 2019, 07:08
Forum: Ask For Help
Topic: delete specific column from excel
Replies: 3
Views: 93

Re: delete specific column from excel

Code: Select all

oExcel.columns("Z").delete
oExcel.range(oExcel.columns("A"),oExcel.columns("C")).delete
by Odlanir
10 Jun 2019, 05:23
Forum: Ask For Help
Topic: How to make fn() function work in this simple GUI? Topic is solved
Replies: 5
Views: 126

Re: How to make fn() function work in this simple GUI? Topic is solved

Code: Select all

Gui Add, Edit, w200 vv1 gg1
Gui Add, Edit, w200 vv2
Gui Show
Return

g1:
gui, Submit, NoHide
fn("v2", v1)
return

fn(param1, param2) {
    GuiControl,,%param1%, % param2*100
}
ExitApp
by Odlanir
09 Jun 2019, 12:15
Forum: Ask For Help
Topic: How to instantly duplicate the current line (i.e. make a copy of current line & paste in next line) M S Word and Notepad Topic is solved
Replies: 7
Views: 136

Re: How to instantly duplicate the current line (i.e. make a copy of current line & paste in next line) M S Word and Not Topic is solved

At the moment I got only an old Word 2003 to test it but this works in this version f8:: oWord := ComObjActive("Word.Application") selection := oWord.selection Selection.HomeKey(wdLine:=5) Selection.EndKey(wdLine, wdExtend:=1) currentline := Selection.Range Selection.HomeKey(wdLine) Selection.TypeTe...
by Odlanir
08 Jun 2019, 08:40
Forum: Ask For Help
Topic: Disable WIN+TAB
Replies: 1
Views: 52

Re: Disable WIN+TAB

Code: Select all

#tab::
return
by Odlanir
08 Jun 2019, 06:13
Forum: Ask For Help
Topic: Is it possible to disable ListView but not column sorting?
Replies: 1
Views: 67

Re: Is it possible to disable ListView but not column sorting?

Try: str := [[1,2,3,4,5],[12,13,14,15,16],[223,224,225,226,227],[3334,3335,3336,3337,3338],[44445,44446,44447,44448,44449]] gui, add , ListView,vLV gLVX AltSubmit,AAA|BBB|CCC|DDD|EEE Loop % str.MaxIndex() { LV_Add("",str[A_Index]*) } LV_ModifyCol(,"integer") gui,show return ExitApp LVX: LV_Modify(A_...
by Odlanir
08 Jun 2019, 05:52
Forum: Ask For Help
Topic: How to insert IDs of customers as KEYS and names of customers as VALUES in an Associative Array? Topic is solved
Replies: 5
Views: 120

Re: How to insert IDs of customers as KEYS and names of customers as VALUES in an Associative Array? Topic is solved

Or even shorter:

Code: Select all

str=
(
10058	JAMES MARTIEN
920098	SABESTIAN CAINE
6500042	DAVID MAC JONESLEY
)

for id, name in Array := Object(StrSplit(str, ["`n","`t"])*)
	msgbox % clipboard := id ":" name

ExitApp
by Odlanir
08 Jun 2019, 05:22
Forum: Ask For Help
Topic: Copy paste a specific file into the active folder
Replies: 3
Views: 155

Re: Copy paste a specific file into the active folder

Some like this ? It works always in the copy but sometimes it miss the selection part at the end. Could be a starting point. #SingleInstance, force #Persistent ^!Space:: ThisFolder := Explorer_GetCurrentFolder() fileTemplate := "C:\template.txt" FileCopy, %fileTemplate%, %ThisFolder% sleep, 1000 fou...
by Odlanir
30 May 2019, 04:13
Forum: Ask For Help
Topic: How to show values from MS Excel's row into ListView's row? Topic is solved
Replies: 2
Views: 76

Re: How to show values from MS Excel's row into ListView's row? Topic is solved

Try this

Code: Select all

arr := Object()
loop, 11
  arr[a_index] := round(xl.Cells(lastrow, a_index+1).value)
LV_Add("",arr[1],arr[2],arr[3],arr[4],arr[5],arr[6],arr[7],arr[8],arr[9],arr[10],arr[11])
or

Code: Select all

LV_Add("")
loop, 11 
  LV_Modify(1,"Col"A_index+0, round(xl.Cells(lastrow, a_index+1).value))
by Odlanir
29 May 2019, 10:35
Forum: Ask For Help
Topic: how to delete multiple blank lines once
Replies: 1
Views: 83

Re: how to delete multiple blank lines once

Code: Select all

TextWithBlankLines=
(
aaaaaaaaaaaaaa
 
 
         
bbbbbbbbbbbbbbb
ccccccccc
            
 
dddddddddd

eeeeeeeeeeeeeeeeeeeeeee
 
 
 
            
            
 
ffffffffffffffffffffffffff
)
MsgBox % RegexReplace(TextWithBlankLines, "m`a)^\s?$\R")
by Odlanir
29 May 2019, 10:25
Forum: Ask For Help
Topic: Scan for text Topic is solved
Replies: 8
Views: 317

Re: Scan for text Topic is solved

Yes. Just replace the loop with this:

Code: Select all

Loop, parse, List, `n
{
 if A_loopfield contains %Clipboard%
   str .= A_loopfield "`n"
}
msgbox % str
by Odlanir
27 May 2019, 08:39
Forum: Ask For Help
Topic: Moving selected text within line with hotkey
Replies: 3
Views: 142

Re: Moving selected text within line with hotkey

I think the combo hotkey (control+shift+alt+right) does not work as expected in Notepad ( it works in Scite ). Try this, It works for me in Notepad ( with the limitation exposed in my previous post) : #Left:: send {ctrl down}x{ctrl up} send {ctrl down}{Left}{ctrl up} send {ctrl down}v{ctrl up} send ...
by Odlanir
27 May 2019, 07:04
Forum: Ask For Help
Topic: Moving selected text within line with hotkey
Replies: 3
Views: 142

Re: Moving selected text within line with hotkey

Just a starting point. This works well on the first of the commented line at bottom ( left and right swapping) but will fails on the second line, due to the comma. The selection MUST include a space after the desired word ( in this case I've selected the XXXXXX word followed by a space . #Persistent...
by Odlanir
26 May 2019, 05:51
Forum: Ask For Help
Topic: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?
Replies: 11
Views: 395

Re: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?

@just me You're right! This should work: WM_CHAR(wParam, lParam){ global hEdi, Edit Gui, Submit, NoHide if ( RegExMatch(Edit, "^-") && Chr(wparam) = "-" ) { EM_SHOWBALLOONTIP(hEdi, "Input error!", "Minus sign valid only at the beginning", 3) Return false } If(A_GuiControl = "Edit" and !RegExMatch(Ch...
by Odlanir
26 May 2019, 03:29
Forum: Ask For Help
Topic: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?
Replies: 11
Views: 395

Re: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?

OnMessage(0x102, "WM_CHAR") Gui, Add, Edit, vEdit hwndhEdi w200 Gui, Show return WM_CHAR(wParam, lParam){ global hEdi If(A_GuiControl = "Edit" and !RegExMatch(Chr(wParam), "^[-0-9\x08]$")) { ; x08 is backspace EM_SHOWBALLOONTIP(hEdi, "Input error!", "Only digits are valid!", 3) Return false } } EM_...
by Odlanir
25 May 2019, 05:02
Forum: Ask For Help
Topic: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?
Replies: 11
Views: 395

Re: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?

Code: Select all

Gui, Add, Edit, vEdit w200
Gui, Show

OnMessage(0x102, "WM_CHAR")
return

WM_CHAR(wParam, lParam){	
	If(A_GuiControl = "Edit" and !RegExMatch(Chr(wParam), "^[-0-9\x08]$")) ; x08 is backspace
		Return false
}
esc::
    ExitApp
by Odlanir
25 May 2019, 04:24
Forum: Ask For Help
Topic: Object handling - Create and manage a CSV-file
Replies: 7
Views: 325

Re: Object handling - Create and manage a CSV-file

Try this:

Code: Select all

Header :=
( LTrim Join QC
	"O)^
	""(?<UID>\d+)"",
	""(?<Col1>.*)"",
	""(?<Col2>.*)"",
	""(?<Col3>.*)"",
	""(?<Col4>.*)"",
	""(?<Col5>.*)"",
	""(?<Col6>.*)"",
	""(?<Col7>.*)""
	$"
)
by Odlanir
21 May 2019, 03:37
Forum: Ask For Help
Topic: ontop rectangle window that change transparency w mouseover Topic is solved
Replies: 4
Views: 103

Re: ontop rectangle window that change transparency w mouseover Topic is solved

change

Code: Select all

WinGet, WinHWD, ID, % WatchWin
with

Code: Select all

WinGet, WinHWD, ID, A

Go to advanced search