Search found 110 matches

by ahcahc
11 Sep 2014, 01:50
Forum: Ask For Help
Topic: WinMove Problems in Photoshop CS6
Replies: 12
Views: 3741

Re: WinMove Problems in Photoshop CS6

Hello i am still newbie at using AHK, but i really want to know more. I am really interested in this scripting language. I am having a problem when moving the Photoshop CS6 window here is my script SetTitleMatchMode, 2 F4:: CoordMode, Mouse, Screen WinMove Photoshop,,0,-345,1372,771 return The prob...
by ahcahc
10 Sep 2014, 23:13
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

If expr is still not 1 and still not 0 after 501 tries, it will return an error. The loop count should be equal to the total numbers of operators used, but to be sure I made it 501.
by ahcahc
10 Sep 2014, 22:54
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

Updated the code. Added a new function bolean_search(). Now it will dynamically choose which special character to use. Uncomment the msgbox in the bolean_search() function to show more info. Edit: Some minor changes Edit: Some improvements Edit: Removed some lines and made one line more confusing th...
by ahcahc
10 Sep 2014, 08:13
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

Yes, MONSTER's Evaluate Arithmetic Expression function is overkill. So I made a simple boolean logic evaluator. So far it has not failed (yet). Edit: Updated the function expression = 1 && 0 || !(0|| 0) ;1 MsgBox % eval_logic(expression) expression = (1 || 0|| 0 ) && 1 && !(0|| 0) ;1 MsgBox % eval_l...
by ahcahc
10 Sep 2014, 04:08
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

I know this has pretty much been solved to the satisfaction of the original post but it caught my eye and looked like an interesting parsing exercise. Here is my more concise approach with everything in one function without the dependency of a library function which seems overkill. Haystack := "Hel...
by ahcahc
09 Sep 2014, 14:25
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

It seems I missed this part in the eval() ; Logic operators: !, ||, &&; ternary operator: (_?_:_);
You can replace those search3 with:

Code: Select all

search3 := RegExReplace(search2,op_and,"&&")    ;AND
search3 := RegExReplace(search3,op_or,"||")    ;OR
search3 := RegExReplace(search3,op_not,"!")    ;NOT
by ahcahc
09 Sep 2014, 09:02
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

algebra: x=1 y=1 z=0 a= x+yz ;1 OR 1 AND 0 a= 1+1*0 a= 1+0 a=1 I have simplified this part of the code, use the code below: while pos := RegExMatch(search1,"((?:(?=\S)[^\s" op_and op_or op_not "()]+\s*)+)",m,A_Index=1?1:pos+StrLen(m)) search2 := RegExReplace(A_Index=1?search1:search2,option_start1 ...
by ahcahc
09 Sep 2014, 08:25
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

eval() treats the final expression just like any mathematical expression. The final expression should only contain 1, 0, +, *, ! or (). string = AutoHotkey is a better language than VBScript search = AutoHotkey OR VBScript AND Microsoft search = 1 OR 1 AND 0 search = 1 + 1 * 0 search = 1 + 0 search ...
by ahcahc
08 Sep 2014, 23:12
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

ahcahc, I just noticed this commented out line: ;Search3 :=RegExReplace(Search3,"(?<=\d)\s+?(?=\d)","*") ;In case regexmatch failed to match the entire sentence, search for space sorrounded by numbers and replace it with * Should I be doing anything with this line? Should it be un-commented? Thanks...
by ahcahc
08 Sep 2014, 19:22
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

1. Yes you can change them to any characters you want. This part. search1 := RegExReplace(RegExReplace(RegExReplace(search,"i)\bAND\b","¤"),"i)\bOR\b","§"),"i)\bNOT\b","¶") while pos := RegExMatch(search1,"((?:(?=\S)[^\s¤§¶()]+\s*)+)",m,A_Index=1?1:pos+StrLen(m)) And this. search3 := RegExReplace(se...
by ahcahc
08 Sep 2014, 17:51
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

I've made some changes, you can now use most characters except ¤§¶(). string = AutoHotkey is a better language than VBScript search = (AutoHotkey OR Auto Hotkey OR Auto-Hotkey) AND language AND NOT (Microsoft OR VBScript) search1 := RegExReplace(RegExReplace(RegExReplace(search,"i)\bAND\b","¤"),"i)\...
by ahcahc
06 Sep 2014, 00:05
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

both of them must have the same options. if a_index=1 search2 := RegExReplace(search,"i)" m,RegExMatch(string,"i)" m) >0 ?1:0) else search2 := RegExReplace(search2,"i)" m,RegExMatch(string,"i)" m) >0 ?1:0) or if a_index=1 search2 := RegExReplace(search,"i)\b" m "\b",RegExMatch(string,"i)\b" m "\b") ...
by ahcahc
05 Sep 2014, 23:48
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

\b means word boundary. \btext\b will only match exactly the word "text", it will not match the "text" in "intexting" or "123text456". I actually forgot to put it in the regexmatch part on my previous code. But removing it should match any word even if it is part of another word.
by ahcahc
05 Sep 2014, 23:13
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

while pos := RegExMatch(search,"\w+",m,A_Index=1?1:pos+StrLen(m)) if (m!="AND") AND (m!="OR") AND (m!="NOT") { if a_index=1 search2 := RegExReplace(search,"i)" m,RegExMatch(string,"i)" m) >0 ?1:0) else search2 := RegExReplace(search2,"i)" m,RegExMatch(string,"i)" m) >0 ?1:0) }
by ahcahc
05 Sep 2014, 12:11
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

You need to comment the hotkey too. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_Scrip...
by ahcahc
05 Sep 2014, 04:32
Forum: Ask For Help
Topic: Boolean Search as the needle searching a haystack
Replies: 52
Views: 11179

Re: Boolean Search as the needle searching a haystack

You need http://www.autohotkey.com/board/topic/15675-monster-evaluate-math-expressions-in-strings/ #Include eval.ahk ;string = hello world string = beta test production ;string = beta production ;string = test search = (hello AND world) OR (beta AND (test OR (NOT production))) while pos := RegExMatc...
by ahcahc
01 Sep 2014, 03:06
Forum: Ask For Help
Topic: #IfWinNotExist Problem
Replies: 1
Views: 756

Re: #IfWinNotExist Problem

try this. #NoTrayIcon #Persistent #SingleInstance ignore DetectHiddenWindows, On settimer, check_if_processing_exist, 500 #IfWinExist TeraImage Window $LButton:: If (A_ThisHotkey == A_PriorHotkey and A_TimeSincePriorHotkey >= DllCall("GetDoubleClickTime")) Send, {LButton} Return check_if_processing_...
by ahcahc
19 Aug 2014, 23:04
Forum: Gaming
Topic: Warframe Chat Buddy
Replies: 0
Views: 2955

Warframe Chat Buddy

Warframe has a severely crippled chat system. You can't select or copy chat text/messages so as to discourage sspammers/scammers. My script provides a way to copy what you are typing and save it to the clipboard so you can paste it later ingame, of course it is not perfect you have to occasional use...
by ahcahc
14 Aug 2014, 12:21
Forum: Ask For Help
Topic: Code obfuscation
Replies: 8
Views: 2876

Re: Code obfuscation

The input file is not an ahk script but a text file that contains the path and filename of the ahk script you want to obfuscate. Read the README.txt inside "example-obfuscated-programs" folder.
by ahcahc
12 Aug 2014, 10:42
Forum: Ask For Help
Topic: Round Robin Help
Replies: 2
Views: 1122

Re: Round Robin Help

Tickets = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 Usernames = name1,name2,name3,name4 result := ticketno=0 tmp=0 Loop,parse,Usernames, `, total_users := A_Index Loop,Parse, Tickets, `, { if (tmp=total_users) tmp=0 tmp++ ticketno := A_LoopField Loop,parse,Usernames, `, if (A_index=tmp) result := result ...

Go to advanced search