Search found 426 matches

by Odlanir
28 Jul 2019, 05:24
Forum: Ask For Help
Topic: Time substracting bug Topic is solved
Replies: 2
Views: 108

Re: Time substracting bug Topic is solved

Yes. It gives an error. I think you should go like this:

Code: Select all

gmt_time := A_Now
gmt_time += -3, hours 
FormatTime, rss_time, %gmt_time%, ddd, dd MMM yyyy HH:mm:ss 'GMT'
MsgBox, % rss_time
or

Code: Select all

FormatTime, rss_time, %A_NowUTC%, ddd, dd MMM yyyy HH:mm:ss 'GMT'
MsgBox, % rss_time
by Odlanir
28 Jul 2019, 01:46
Forum: Ask For Help
Topic: Inputting {Enter} key in global variables
Replies: 2
Views: 104

Re: Inputting {Enter} key in global variables

Code: Select all

global test := "1234{Enter}"
by Odlanir
27 Jul 2019, 13:24
Forum: Ask For Help
Topic: Click On Progress Bar?
Replies: 13
Views: 405

Re: Click On Progress Bar?

The array already contains all the colors code so you can access it in the function using the global declaration.

Code: Select all

WM_LBUTTONDOWN() {
   global arr
   If (A_GuiControl) {
      Msgbox % "You've clicked on " a_guicontrol " and the HEX code is " arr[substr(a_guicontrol,8)]
   }
}
by Odlanir
27 Jul 2019, 12:55
Forum: Ask For Help
Topic: Click On Progress Bar?
Replies: 13
Views: 405

Re: Click On Progress Bar?

I've saved your list in color.txt. FileRead, colors, colors.txt arr := StrSplit(colors,"`n","`r") OnMessage(0x201,"WM_LBUTTONDOWN") cnt := 0 Gui, add, text, y-35 Hidden loop, 10 { Gui, add, Progress,% "x010 yp+41 w40 h40 Background" arr[++cnt] " vControl" cnt loop, 9 Gui, add, Progress,% "x" a_index...
by Odlanir
27 Jul 2019, 12:33
Forum: Ask For Help
Topic: how to get the document path of excel.exe like resmon.exe?
Replies: 3
Views: 201

Re: how to get the document path of excel.exe like resmon.exe?

Code: Select all

processName := "Excel"
for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process WHERE name like '"processName  "%' ") {   	
   MsgBox %  process.ExecutablePath	
}
by Odlanir
27 Jul 2019, 12:25
Forum: Ask For Help
Topic: Click On Progress Bar?
Replies: 13
Views: 405

Re: Click On Progress Bar?

Some like this? OnMessage(0x201,"WM_LBUTTONDOWN") cnt := 0 Gui, add, text, y-35 Hidden loop, 10 { Gui, add, Progress,% "x010 yp+41 w40 h40 Background" rndCol() " vControl" ++cnt loop, 9 Gui, add, Progress,% "x" a_index * 40 +10 " yp w40 h40 Background" rndCol() " vControl" ++cnt } Gui, Show return r...
by Odlanir
27 Jul 2019, 05:35
Forum: Ask For Help
Topic: Automatically replace " with ""
Replies: 3
Views: 96

Re: Automatically replace " with ""

Press esc to terminate the script

Code: Select all

*"::
send {" 2}
send {left}
return
   
*esc::
   ExitApp
by Odlanir
27 Jul 2019, 03:11
Forum: Ask For Help
Topic: Click On Progress Bar?
Replies: 13
Views: 405

Re: Click On Progress Bar?

Code: Select all

OnMessage(0x201,"WM_LBUTTONDOWN")
WM_LBUTTONDOWN() {
	If (A_GuiControl = "PrBar1") {
      Msgbox % "You've clicked on the progress bar"
   }
}

Gui Add, Progress, w300 h20 Backgroundccccff vPrBar1
Gui Show, w700 h140, My Progress Bar  
return
by Odlanir
26 Jul 2019, 00:35
Forum: Ask For Help
Topic: Using RegExMatch with a "range" of expressions Topic is solved
Replies: 4
Views: 158

Re: Using RegExMatch with a "range" of expressions Topic is solved

Just as curiosity. What exactly does ---O)(\d*)\s--- means? I know \s is the blank character and \d are the digits. but what is the "O)" for? https://www.autohotkey.com/docs/commands/RegExMatch.htm#MatchObject If the data was "+6 red cars" for example... would this still work? Or you'd have to spec...
by Odlanir
25 Jul 2019, 10:03
Forum: Ask For Help
Topic: How to add an underline when the cursor is over the text? Topic is solved
Replies: 10
Views: 416

Re: How to add an underline when the cursor is over the text? Topic is solved

Or more precisely, how to determine if the current cursor is above a control? OnMessage(0x200,"WM_MOUSEHOVER") Gui, Add, Text, vText1 gDmy, Some text ;To get notifications from static controls (Text, Pic) you have to define a gLabel or set the style SS_NOTIFY := 0x0100 Gui, Add, Button, vBtn1 , But...
by Odlanir
24 Jul 2019, 08:19
Forum: Ask For Help
Topic: How to display a countdown of 60 seconds in Gui? Topic is solved
Replies: 3
Views: 117

Re: How to display a countdown of 60 seconds in Gui? Topic is solved

Code: Select all

Gui, Add, Text, vCountdown w100
Gui, Add, Button,, Start
Gui, Show, h300 w400
return

ButtonStart:
   cnt := 60
   SetTimer, Go, 1000
return

Go:   
   GuiControl,,Countdown, % cnt
   if (--cnt < 0)
      SetTimer, Go, off
return

*esc::
   ExitApp
by Odlanir
24 Jul 2019, 08:12
Forum: Ask For Help
Topic: Help needed to opt out of send in the code!
Replies: 7
Views: 384

Re: Help needed to opt out of send in the code!

str1 = ( Hello, Please follow these instructions in order for the issue to be resolved. Kind regards, Gdark Gdark whatever company ) str2 := "Please follow these instructions in order for the issue to be resolved." ^Numpad7:: gui, -border ; a gui is better than a MsgBox since you can specify the bu...
by Odlanir
23 Jul 2019, 07:42
Forum: Ask For Help
Topic: Outlook: mark as complete Topic is solved
Replies: 15
Views: 514

Re: Outlook: mark as complete Topic is solved

To respect the format in your date ( without padding 0 in the hour ) this can do the trick: MsgBox % NextDayFromUserDatetime("07/18/2019 7:00") NextDayFromUserDatetime(utm) { d := StrSplit(Substr(utm,1,10),"/") h := strsplit(Substr(utm,12),":") datex := format("{}{}{}{:02}{:02}",d[3],d[1],d[2],h[1],...
by Odlanir
23 Jul 2019, 01:34
Forum: Ask For Help
Topic: Parsing xml file for a specific name inside a tag Topic is solved
Replies: 9
Views: 531

Re: Parsing xml file for a specific name inside a tag Topic is solved

Code: Select all

var := "HOD"
RegExMatch(XMLSource, "s)<Type>" var "<\/Type>.*?<Status>(.*?)<\/Status>", Status)
MsgBOx, % Status1
by Odlanir
22 Jul 2019, 07:00
Forum: Ask For Help
Topic: read directory: number of files and name of the first file
Replies: 3
Views: 159

Re: read directory: number of files and name of the first file

Another way:

Code: Select all

arr := []
loop, files, c:\temp\*.*, FDR ; F = Include files - D = Include Folder - R = recurse subdir ( Default F )
    arr[a_index]  := A_LoopFileFullPath
MsgBox % "Total files : " arr.MaxIndex() "`nFirst file : " arr[1]
by Odlanir
20 Jul 2019, 10:11
Forum: Ask For Help
Topic: How to Select (Click) a Row in a ListBox or ComboBox? Topic is solved
Replies: 2
Views: 193

Re: How to Select (Click) a Row in a ListBox or ComboBox? Topic is solved

gui, add, ComboBox, gCombo vCmb, aaa||bbb|ccc|ddd|eee gui, Show return Combo: Gui, submit, NoHide MsgBox % Cmb return f1:: GuiControl, Choose, Cmb, 4 ; this will only select the 4th item ;~ GuiControl, Choose, Cmb, |4 ; this will also fire the g-label acting as a click on the control return GuiClos...
by Odlanir
20 Jul 2019, 03:54
Forum: Ask For Help
Topic: Really simple stuff - Diffrent outcomes of pressing one button second time
Replies: 2
Views: 189

Re: Really simple stuff - Diffrent outcomes of pressing one button second time

In a shorter form:

Code: Select all

cnt := 0, chars := StrSplit("ABCDE") ; if you change the chars the script will cycle for all the char listed
x::			 
   send, % chars[mod(cnt++,chars.MaxIndex())+1] 
Return
or

Code: Select all

send, % cnt++ >= chars.MaxIndex() ? chars[cnt:=1] : chars[cnt]
by Odlanir
19 Jul 2019, 05:55
Forum: Ask For Help
Topic: switching between sets of hotkeys
Replies: 1
Views: 158

Re: switching between sets of hotkeys

Code: Select all

#NoEnv
#Persistent
!F1::Flag := !Flag

#If (Flag) 
!e::Send, Ǝ
e::Send, ǝ
#If !(Flag) 
!e::Send,ǝ
e::Send, e
#If 
by Odlanir
19 Jul 2019, 00:57
Forum: Ask For Help
Topic: [Solved] ListView search / filter
Replies: 24
Views: 2902

Re: [Solved] ListView search / filter

@garry If you clear the search edit field ( after a search ) the ListView is a mess. I suggest you to use an object to store the value pairs. This enable also the path display when search is used. #NoEnv #SingleInstance force SetBatchLines, -1 LVArray := {} Gui, Add, Text, ,Search: Gui, Add, Edit, ...

Go to advanced search