Search found 110 matches

by ahcahc
19 Oct 2016, 09:48
Forum: Ask For Help
Topic: Need tweak to a RegExMatch
Replies: 15
Views: 1971

Re: Need tweak to a RegExMatch

that would look something like this (?:https?:\/\/)?\w+(?:\.\w+)+|[[:alpha:]]:(?:\\[[email protected]#$%^&()_+=-`~\[\]{};', \w]+)(?:\.[[email protected]#$%^&()_+=-`~\[\]{};', \w]+)*|\$?\b[@.,\w'’-]+\b
by ahcahc
19 Oct 2016, 04:45
Forum: Ask For Help
Topic: Need tweak to a RegExMatch
Replies: 15
Views: 1971

Re: Need tweak to a RegExMatch

try \$?\b[,\w'’-]+\b

if you want to include email address \$?\b[@.,\w'’-]+\b
by ahcahc
17 Oct 2016, 09:51
Forum: Ask For Help
Topic: LAN discovery
Replies: 2
Views: 1266

Re: LAN discovery

Online nodes that don't reply to pings will still have their ip/mac address added in the arp table (arp -a).

try fing. https://www.fing.io/download/
by ahcahc
16 Oct 2016, 12:20
Forum: Ask For Help
Topic: regular expressions Topic is solved
Replies: 4
Views: 998

Re: regular expressions Topic is solved

im)(?<!\d)1(?!\d) im) - i (ignorecase) m (multiline), you don't need to use these options since you are only searching for numbers and does not invovle checking for the beginning/end of the line. (?<!\d) - negative look behind, character must not be \d (digit) before the next character which is 1 (...
by ahcahc
16 Oct 2016, 12:16
Forum: Ask For Help
Topic: Make AHK script run from server ONLY Topic is solved
Replies: 4
Views: 1197

Re: Make AHK script run from server ONLY Topic is solved

If your goal is to just share the script then you don't need to add any another codes to make it work on other computers (as long as autohotkey is also install on that computer or the script is compiled)

The script above puts some restrictions on who can run the rest of the script.
by ahcahc
16 Oct 2016, 07:30
Forum: Ask For Help
Topic: Make AHK script run from server ONLY Topic is solved
Replies: 4
Views: 1197

Re: Make AHK script run from server ONLY Topic is solved

Check out A_ScriptDir and A_IPAddress1 through 4 variables. https://autohotkey.com/docs/Variables.htm#BuiltIn network_shared_folder = \\192.1.2.3\scriptfolder123 whitelist = ;ip address(es) of the server or the machine you are testing your script ( 192.1.2.3 192.3.2.1 192.168.1.23 ) server_ip := 0 l...
by ahcahc
13 Oct 2016, 02:08
Forum: Ask For Help
Topic: Changing date format
Replies: 7
Views: 1753

Re: Changing date format

or /** copy the texts below then press control+F1 only once. Clipboard = ( Thursday 31 July Friday 01 August Saturday 02 August Saturday 03 August Saturday 04 August Saturday 05 August Saturday 06 August Saturday 10 August Saturday 11 August Saturday 12 August Saturday 13 August Saturday 14 August S...
by ahcahc
13 Oct 2016, 02:06
Forum: Ask For Help
Topic: Regular Expressions Help
Replies: 8
Views: 1881

Re: Regular Expressions Help

Test = ( http://www.facebook.com http://www.twitter.com chrome://bookmarks/#34561 chrome://bookmarks/#q=chrome://newta chrome://bookmarks/#20793 https://disqus.com/home/inbox/ https://autohotkey.com/ ) test := RegExReplace(test, "`am)^\s+|[ \t]+$|chrome://bookmarks.*\R") ;also removes blank lines M...
by ahcahc
08 Oct 2016, 13:26
Forum: Ask For Help
Topic: Make ahk file copy protected Topic is solved
Replies: 14
Views: 3970

Re: Make ahk file copy protected Topic is solved

I don't think you can prevent copying, if they have read access they can also copy/paste it. You could make your script delete itself, buy running command prompt del the exe, put some delay before the del command, and then run the script/exe from the server.
by ahcahc
07 Oct 2016, 09:41
Forum: Ask For Help
Topic: What are your tricks to remember the Shift + and Alt ! symbols?
Replies: 8
Views: 1983

Re: What are your tricks to remember the Shift + and Alt ! symbols?

+ Need to press SHIFT then = in order to type + sign.

! Attention sign. Attention and alt both start with the same letter they also have the same 3rd letter, combine them to make altention.
by ahcahc
06 Oct 2016, 23:23
Forum: Ask For Help
Topic: RegEx to handle apostrophes in words properly
Replies: 7
Views: 1396

Re: RegEx to handle apostrophes in words properly

from here http://www.alanwood.net/demos/ansi.html

You can also get the char number by copy/pasting the character and then use asc()

Code: Select all

MsgBox % asc("'")			;39
MsgBox % asc("‘")			;8216
MsgBox % asc("’")			;8217
;Works if the script file is encoded in UTF-8-BOM.
by ahcahc
06 Oct 2016, 21:43
Forum: Ask For Help
Topic: RegEx to handle apostrophes in words properly
Replies: 7
Views: 1396

Re: RegEx to handle apostrophes in words properly

Code: Select all

text = don't forget mother's day, 

while  pos := RegExMatch(text, "\b[\w'" Chr(8216) Chr(8217) "]+\b", m, a_index=1?1:pos+strlen(m))
	MsgBox % m
by ahcahc
06 Oct 2016, 10:01
Forum: Ask For Help
Topic: Calculate the first address of subnet
Replies: 8
Views: 1517

Re: Calculate the first address of subnet

a_index=1 ? octet := 4 : octet-- is a ternary operation. If a_index = 1 (first instance inside the loop) then execute octet := 4 else execute octet-- . This is to check the subnetmask starting from the last octet. https://autohotkey.com/docs/Variables.htm#Operators I've cleaned the scrip a bit. ip ...
by ahcahc
06 Oct 2016, 00:13
Forum: Ask For Help
Topic: Calculate the first address of subnet
Replies: 8
Views: 1517

Re: Calculate the first address of subnet

192.168.5.0 255.255.255.252(/30) its subnet is incremented by 4, that means 192.168.5.0 is a subnet, 192.16.5.4 is another subnet, 192.168.5.5-192.168.5.6 usable hosts, 192.168.5.7 broadcast. 192.168.5.8 another subnetwork. edit: just add if (mask != "255.255.255.254") above gateway := ip_increment(...
by ahcahc
05 Oct 2016, 03:28
Forum: Ask For Help
Topic: Calculate the first address of subnet
Replies: 8
Views: 1517

Re: Calculate the first address of subnet

Using one of my old function. And only did few tests. ip = 10.56.127.78 mask = 255.255.252.0 ;ip = 192.168.5.4 ;mask = 255.255.255.252 ;ip = 192.168.1.2 ;mask = 255.255.255.0 ;ip = 123.110.12.1 ;mask = 255.128.0.0 ip_array := StrSplit(ip,.) gateway_array := StrSplit(ip,.) mask_array := StrSplit(mask...
by ahcahc
27 Sep 2016, 09:07
Forum: Ask For Help
Topic: getElementsByClassName doesn't work Topic is solved
Replies: 5
Views: 1784

Re: getElementsByClassName doesn't work Topic is solved

Thank you very much. It works.
by ahcahc
27 Sep 2016, 07:20
Forum: Ask For Help
Topic: getElementsByClassName doesn't work Topic is solved
Replies: 5
Views: 1784

Re: getElementsByClassName doesn't work Topic is solved

Ok I've modified the script, but still gives the same error.
by ahcahc
27 Sep 2016, 06:17
Forum: Ask For Help
Topic: getElementsByClassName doesn't work Topic is solved
Replies: 5
Views: 1784

getElementsByClassName doesn't work Topic is solved

html = ( <!DOCTYPE html> <html> <body> <div class="example">First div element with class="example".</div> <div class="example">Second div element with class="example".</div> <p>Click the button to change the text of the first div element with class="example" (index 0).</p> <button onclick="myFuncti...
by ahcahc
04 Apr 2016, 08:48
Forum: Ask For Help
Topic: Search image for 10 seconds
Replies: 2
Views: 798

Re: Search image for 10 seconds

taken from one of my scripts. res := imgSearch(oX, oY, 0, 0, A_ScreenWidth, A_ScreenHeight, "test.png", 10) ;imagesearch test.png until it is found for 10 if res = 0 MsgBox found ExitApp imgSearch(ByRef oX, ByRef oY, x1, y1, x2, y2, img, t) { st := A_TickCount again_: ImageSearch, oX, oY, x1, y1, x2...
by ahcahc
05 Mar 2016, 12:58
Forum: Gaming
Topic: I have been trying for so long (requires math)
Replies: 9
Views: 2279

Re: I have been trying for so long (requires math)

Tested with win 8.1 1920x1080. Open the attached file with mspaint, make sure you select the pencil tool, set the size to 4px and the zoom 100%. Ctrl+ click inside box 1. #SingleInstance force #InstallMouseHook #Persistent CoordMode, mouse, screen SendMode, Input bx1 := 42, by1 = 215 ;base position ...

Go to advanced search