Search found 465 matches

by AlphaBravo
10 Jul 2019, 19:31
Forum: Ask For Help
Topic: Running Loop for a Limited Amount of Time
Replies: 2
Views: 108

Re: Running Loop for a Limited Amount of Time

totalTime := stop - start needs to be inside the loop
by AlphaBravo
22 Mar 2019, 13:25
Forum: Ask For Help
Topic: workday
Replies: 5
Views: 359

Re: workday

MsgBox % WorkDay(20190322, 2, [20190326, 20190327]) MsgBox % WorkDay(20190322, 2) return WorkDay(Start_Date, Days, Holidays := ""){ WorkDay_Loop: while Days { Start_Date++ FormatTime, WeekDay , % Start_Date, WDay if WeekDay in 1,7 continue for each, Holiday in Holidays if (Start_Date = Holiday) con...
by AlphaBravo
20 Mar 2019, 08:58
Forum: Ask For Help
Topic: Adjust vertical mouse sensitivity?
Replies: 6
Views: 414

Re: Adjust vertical mouse sensitivity?

this seems to work SPI_GETMOUSESPEED = 0x70 SPI_SETMOUSESPEED = 0x71 DllCall("SystemParametersInfo", UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, OrigMouseSpeed, UInt, 0) return Tab:: MouseGetPos, mx1, my1 while GetKeyState("Tab", "P") { MouseGetPos, mx2, my2 if (mx1 = mx2) && (my1 <> my2) ; vertical mo...
by AlphaBravo
19 Mar 2019, 11:00
Forum: Ask For Help
Topic: Need to sum duplicate value and price
Replies: 7
Views: 434

Re: Need to sum duplicate value and price

data = (C Invoice No Invoice Date Pt Name Address Customer ID Old Customer ID Order No Order Date Delivery No Delivery Date Our Reference Item ID Unit Unit Price Item Name HCPC Code Total Price Discount Contract Allowed Net Price (Item) Pt Share (Item) Pt Resp (Item) SubTotal Oth Resp Invoice Total...
by AlphaBravo
24 Feb 2019, 13:09
Forum: Ask For Help
Topic: AHK: Excel_Autofilter
Replies: 3
Views: 313

Re: AHK: Excel_Autofilter

I think you have to loop through visible cells

Code: Select all

for c in xl.Worksheets(1).AutoFilter.Range.Columns("E").SpecialCells(12)
{
	if A_Index = 2 				; second row after title
	{
		MsgBox % c.address " = " c.value
		break
	}
}
by AlphaBravo
19 Feb 2019, 21:00
Forum: Ask For Help
Topic: regex question Topic is solved
Replies: 6
Views: 453

Re: regex question Topic is solved

just me wrote:
19 Feb 2019, 03:49
Not quite.
RegEx - Quick Reference wrote:\w ... This is equivalent to [a-zA-Z0-9_]. ...
fair enough ;)
by AlphaBravo
18 Feb 2019, 21:41
Forum: Ask For Help
Topic: regex question Topic is solved
Replies: 6
Views: 453

Re: regex question Topic is solved

I am guessing this is what you're looking for variable = abcd-567 ; or 12abcd-567 if RegExMatch(variable,"((?:\d|\w)+)-(\d+)",vars) msgbox,% vars1 . "_" . vars2 ; or if RegExMatch(variable,"((\d|\w)+)-(\d+)",vars) msgbox,% vars1 . "_" . vars3 ; or variable = 12abcd-567 if RegExMatch(variable,"(\w+)-...
by AlphaBravo
10 Feb 2019, 12:17
Forum: Ask For Help
Topic: How to get handle to specific excel file among multiple opened excel files?
Replies: 16
Views: 961

Re: How to get handle to specific excel file among multiple opened excel files?

try this

Code: Select all

path := "c:\a.xlsx"
WB := ComObjGet(path)
xl := WB.Application
by AlphaBravo
05 Feb 2019, 16:04
Forum: Ask For Help
Topic: How to add text to a text file (encoding!) Topic is solved
Replies: 18
Views: 980

Re: How to add text to a text file (encoding!) Topic is solved

try the following, it didn't change encoding for me File := A_ScriptDir . "\Test.txt" ; Encoding unknown! AddStr := "Add this line." file := FileOpen(File, "rw") if !IsObject(file) { MsgBox Can't open "%File%" return } fileContents := file.Read() file.Position := 0 file.Write(AddStr "`r`n" fileConte...
by AlphaBravo
02 Feb 2019, 23:44
Forum: Ask For Help
Topic: HELP: Strings? Arrays? A-Arrays?
Replies: 5
Views: 413

Re: HELP: Strings? Arrays? A-Arrays?

this code is based on the assumption that all lines end with "ClearDX" HTN := "HTN,CBC,CMP" ;,ClearDX" HLD := "HLD,CMP,Lipid_Pane" ;,ClearDX" T2DM := "T2DM,A1c,CMP,UrineMA" ;,ClearDX" Anemia := "Anemia,CBC,Ferritin,TIBC" ;,ClearDX" Diags_Present := "HLD,T2DM," ; example present := [] for each, diag ...
by AlphaBravo
28 Jan 2019, 12:53
Forum: Ask For Help
Topic: parse a string with regex delimiter
Replies: 8
Views: 438

Re: parse a string with regex delimiter

Code: Select all

string = sd12354fg14582gh25468jj54582rr45821lk45896qq7854
MsgBox % string := Trim(RegExReplace(string , "[a-zA-Z]+\d+", "$0 "), " ")
by AlphaBravo
25 Jan 2019, 23:12
Forum: Ask For Help
Topic: Extract hostname from URL?
Replies: 14
Views: 835

Re: Extract hostname from URL?

to catch other domains as well as ".com"

Code: Select all

myVariable =
(
Input: https://mysite.myorginzation.com:8443
Input: https://mysite.myorginzation.org/page/app.aspx
Input: ftp://mysite.myorginzation.net
)

while pos := RegExMatch(myVariable, "://\K([^/:\s]+)", m, A_Index=1?1:pos+StrLen(m))
	MsgBox % m1
by AlphaBravo
23 Jan 2019, 22:14
Forum: Ask For Help
Topic: Script to Concatenate two CSVs
Replies: 2
Views: 217

Re: Script to Concatenate two CSVs

I've been using AHK for years now What took you so long to register ;) csv1 = ( DRIVE NAME,USERS ENGINEERING,jim,joe,sally FILESHARE,greg,joe,sally HOME,greg,jim,joe,sally ) csv2 = ( DRIVE NAME,USERS CONTRACTS,bob,tina ENGINEERING,bob,frank,tina FILESHARE,bob,frank,ross HOME,bob,frank,haley,ross,ti...
by AlphaBravo
18 Jan 2019, 12:34
Forum: Ask For Help
Topic: How to find duplicate lines? Topic is solved
Replies: 17
Views: 1177

Re: How to find duplicate lines? Topic is solved

I don't mean to pick on you sinkfaze, but there is a flaw in the answer due to the use of StrReplace() try it on this input a= ( 1 2 3 32 2 1 ) b := a elements := [] loop, parse, b, `n, `r elements[A_LoopField] := elements[A_LoopField] ? elements[A_LoopField] + 1 : 1 for element, count in elements i...
by AlphaBravo
15 Jan 2019, 16:37
Forum: Ask For Help
Topic: Outlook in Windows 10 - UAC Issues Topic is solved
Replies: 17
Views: 2304

Re: Outlook in Windows 10 - UAC Issues Topic is solved

awel20 , Thanks for taking the time to elaborate on that and your input. Unfortunately the only thing I can suggest is making sure your script is running with the same level of privileges as Outlook. just like you suggested when I ran outlook with elevated privilege (run as admin) I was able to get ...
by AlphaBravo
12 Jan 2019, 13:53
Forum: Ask For Help
Topic: Outlook in Windows 10 - UAC Issues Topic is solved
Replies: 17
Views: 2304

Re: Outlook in Windows 10 - UAC Issues Topic is solved

I am working on a script that needs to run as admin, and came across the issue with ComObjActive not working with Outlook when elevated.
I found few posts discussing it but still did not find a solid solution.
has anyone got Acc_ObjectFromWindow to work on Outlook?

Go to advanced search