Search found 460 matches

by AlphaBravo
19 Feb 2019, 21:00
Forum: Ask For Help
Topic: regex question Topic is solved
Replies: 6
Views: 135

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: 135

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: 371

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: 394

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: 218

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: 180

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: 391

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: 95

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: 621

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: 1623

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: 1623

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?
by AlphaBravo
12 Jan 2019, 12:20
Forum: Scripts and Functions
Topic: Reads Excel (xlsx) Fast
Replies: 22
Views: 2820

Re: Reads Excel (xlsx) Fast

Hello IMEime, I have noticed your reference to this script from "Comparing 2 excel Files takes Forever to finish" request, I gave it a bit of testing and while it is for sure faster than iterating through Excel cells via COM, I noticed that if a cells is formatted (Bold/Italic/Underlined/formatted a...
by AlphaBravo
12 Jan 2019, 11:08
Forum: Ask For Help
Topic: Script to rename files Topic is solved
Replies: 22
Views: 872

Re: Script to rename files Topic is solved

no worries, this should do it, I added a couple of lines oWord := {"à":"a", "á":"a", "ã":"a", "â":"a", "é":"e", "è":"e", "ê":"e" , "í":"i", "ì":"i", "ó":"o", "õ":"o", "ô":"o", "ò":"o", "ú":"u" , "ù":"u", "ç":"c", "À":"A", "Á":"A", "Ã":"A", "Â":"A", "É":"E" , "Ê":"E", "È":"E", "Í":"I", "Ì":"I", "Ó":"...
by AlphaBravo
12 Jan 2019, 02:51
Forum: Ask For Help
Topic: Script to rename files Topic is solved
Replies: 22
Views: 872

Re: Script to rename files Topic is solved

hello again, I see the issue, modified the script a little bit oWord := {"à":"a", "á":"a", "ã":"a", "â":"a", "é":"e", "è":"e", "ê":"e" , "í":"i", "ì":"i", "ó":"o", "õ":"o", "ô":"o", "ò":"o", "ú":"u" , "ù":"u", "ç":"c", "À":"A", "Á":"A", "Ã":"A", "Â":"A", "É":"E" , "Ê":"E", "È":"E", "Í":"I", "Ì":"I",...
by AlphaBravo
05 Jan 2019, 21:55
Forum: Ask For Help
Topic: RegExReplace - Address of Excel cell + Range Topic is solved
Replies: 4
Views: 177

Re: RegExReplace - Address of Excel cell + Range Topic is solved

(Instead of 2200 it could be the actual range, but 2200 should be enough in my case). what is the actual range ?? if the "actual range" is the last cell with data in the active column and is likely to be at a row number less than 2200 xl := ComObjActive("Excel.Application") col := xl.ActiveCell.Col...

Go to advanced search