Search found 794 matches

by FanaticGuru
08 Dec 2017, 13:09
Forum: Ask For Help
Topic: MS Word: duplicate line
Replies: 6
Views: 89

Re: MS Word: duplicate line

This is possibly a good alternative, it depends on how Word handles lines / 'paragraphs': q:: ;word - duplicate line (copy line above) wdFirstCharacterLineNumber := 10 oWd := ComObjActive("Word.Application") vLineNum := oWd.Selection.Information(wdFirstCharacterLineNumber) vText := oWd.Ac...
by FanaticGuru
07 Dec 2017, 19:22
Forum: Ask For Help
Topic: MS Word: duplicate line
Replies: 6
Views: 89

Re: MS Word: duplicate line

I have this code to copy down the line above in MS Word. I'm posting in case anyone who knows Word, can improve it in any way. Thanks. q:: ;word - duplicate line (copy line above) wdLine := 5, wdExtend := 1 oWd := ComObjActive("Word.Application") ;oWd.Activate oWd.Selection.MoveUp(wdLine,...
by FanaticGuru
06 Dec 2017, 20:50
Forum: Ask For Help
Topic: Maths puzzle Topic is solved
Replies: 14
Views: 269

Re: Maths puzzle Topic is solved

Depending on definitions, a point on a corner might be considered as intersecting 4 squares. Yes, but two of the cells (squares) will be caught by his code as the line travels through two of the cells and intersects the cells' area in many point that he checks (35 and 46 for example) but two of the...
by FanaticGuru
06 Dec 2017, 19:16
Forum: Ask For Help
Topic: Maths puzzle Topic is solved
Replies: 14
Views: 269

Re: Maths puzzle Topic is solved

Is it because maths limitation or because I jump several pixels while checking instead of 1? Btw, what would you do to make this script faster? I am looking forward to using it with many other functions in a loop which runs with sleep,1 :? It is a math limitation of your code. It is not really abou...
by FanaticGuru
06 Dec 2017, 13:55
Forum: Ask For Help
Topic: Maths puzzle Topic is solved
Replies: 14
Views: 269

Re: Maths puzzle Topic is solved

Your formula from the other thread made this puzzle so easy to solve man, look at how I did it: accuracy:=5 ;accuracy in pixels tilew:=60 ;tile width in pixels mapX:=600 ;grid length in pixels mapY:=600 ;grid length in pixels lx:=59 ;start coordinates ly:=30 ;start coordinates px:=59 ;goal coordina...
by FanaticGuru
05 Dec 2017, 16:51
Forum: Ask For Help
Topic: Maths question :D Topic is solved
Replies: 7
Views: 166

Re: Maths question :D Topic is solved

I added a couple of functions that you may find useful. PointAx:= 100 PointAy:= 100 PointBx:= 500 PointBy:= 500 PointCx:= 300 PointCy:= 100 PointDcoordinates:= G(PointBx-PointAx, PointAy-PointBy, PointCx-PointAx, PointAy-PointCy) msgbox, PointD coords: Dx%fx%, Dy%fy% MsgBox % "Line Segment CD L...
by FanaticGuru
04 Dec 2017, 14:46
Forum: Scripts and Functions
Topic: [Function] Min/Max including with Associative Arrays
Replies: 1
Views: 113

[Function] Min/Max including with Associative Arrays

[Function] Min / Max I have had a Min/Max function in my library for years that used a variadic parameter so that you could pass it as many parameters as you liked. This allowed it to also work with a simple array parameter if followed by a * but I discovered today that it did not work for associat...
by FanaticGuru
30 Nov 2017, 13:28
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 61
Views: 2223

Re: Split excel file in many small ones

When I add that I get this error: --------------------------- Excel splitter gui.ahk --------------------------- Error: 0x800A03EC - Source: Microsoft Office Excel Description: Eigenschap SaveAs van klasse Workbook kan niet worden opgehaald. HelpFile: C:\Program Files\Microsoft Office\Office12\1033...
by FanaticGuru
30 Nov 2017, 03:40
Forum: Ask For Help
Topic: A* Pathfinding Algorithm help.
Replies: 3
Views: 155

Re: A* Pathfinding Algorithm help.

Didn't really study your code much just saw the title and thought it would be fun to write a A* Pathfinding function. Here is my version. Grid = ; Easier to create with monospace text (Join`n ********** * A * * * * ******* * * * * * **** * ** * * ** * ** Z* * * * ********** ) ; Create Array from Gri...
by FanaticGuru
29 Nov 2017, 19:38
Forum: Ask For Help
Topic: Is there a fool-proof way to maxmize a window?
Replies: 5
Views: 72

Re: Is there a fool-proof way to maxmize a window?

Since you didn't post your code it is difficult to determine if you are just making a simple timing error or maybe not using the proper title for your window. When you run a program you have to wait till its window exist before you can start doing stuff with it. Run Notepad.exe,, Min ; Start Notepad...
by FanaticGuru
29 Nov 2017, 14:48
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 61
Views: 2223

Re: Split excel file in many small ones

Thanks for your input FG, much appreciated. However, my question was specifically about the piece of code I quoted above. Column A now gets converted properly to a date. But column B and C need the same conversion. I cannot seem to get it working. You have to change both Columns reference and the R...
by FanaticGuru
29 Nov 2017, 14:35
Forum: Ask For Help
Topic: Numbers and letters per string of random with NO repetition
Replies: 6
Views: 101

Re: Numbers and letters per string of random with NO repetition

Below is my take using an object approach. ; Create Display string of Passwords from returned object for key, Password in Passwords(4,6) ; 4 Passwords with 6 characters each Display .= Password "`n" MsgBox % Display ; Create X unique Passwords of L length Passwords(X:=2, L:=8) { O := {} Lo...
by FanaticGuru
29 Nov 2017, 13:42
Forum: Ask For Help
Topic: RegExMatch little help
Replies: 1
Views: 38

Re: RegExMatch little help

ttx := RegExMatch(txt, "text where the area starts(\X+?)text where the area ends", New_Body)

FG
by FanaticGuru
29 Nov 2017, 13:37
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 61
Views: 2223

Re: Split excel file in many small ones

Hi Kon, It's been a while, (vacation) but I have a little question how do I incorporate this piece of code for Column B and C as well ? ; Convert dates stored as text to dates. (Column A) ; <--- Added SA := ComObjArray(0xC, 2), SA[0] := 1, SA[1] := xlDMYFormat ; <--- Added wbkSrc.Worksheets(1).Colu...
by FanaticGuru
27 Nov 2017, 13:56
Forum: Ask For Help
Topic: RunWait and EXCEL
Replies: 5
Views: 82

Re: RunWait and EXCEL

Code: [Select all]GeSHi © Codebox Plus

if WinExist("ahk_exe EXCEL.EXE")
WinWaitClose
else
RunWait, EXCEL.EXE
MsgBox DONE

FG
by FanaticGuru
27 Nov 2017, 13:49
Forum: About This Community
Topic: Rule Poll
Replies: 58
Views: 2048

Re: Rule Poll

Just noticed this poll. Of all the posters, Blackholyman is probably the one I align with the most. I am not for policing whether people are hacking or cheating in games. First, it is very difficult and subjective. That is the job of the game developers to decide how hard they want to make it. Secon...
by FanaticGuru
23 Nov 2017, 01:30
Forum: Ask For Help
Topic: Maths puzzle Topic is solved
Replies: 14
Views: 269

Re: Maths puzzle Topic is solved

Nice, FanaticGuru. I took the same approach, that is to check intersections with square borders. I didn't finish it though, still need to handle the vertical line case, yours does I see, very well done. If you want to compare, also, you didn't include min/max functions. I did it for v2, but I think...
by FanaticGuru
22 Nov 2017, 19:06
Forum: Ask For Help
Topic: Maths puzzle Topic is solved
Replies: 14
Views: 269

Re: Maths puzzle Topic is solved

This was an interesting puzzle. I approached it from pure geometry math. Each cell is defined by 4 line segments. So to determine if a transecting line segment intersects any cell you need only to determine if it intersects with any of those 4 line segments. The below script not only finds all the c...
by FanaticGuru
18 Nov 2017, 02:38
Forum: Ask For Help
Topic: Send variables to another script Topic is solved
Replies: 7
Views: 186

Re: Send variables to another script Topic is solved

But the method I decided to go with is to create a hidden Gui that acts like a variable. You could use ShellBrowserWindow object instead of a hidden window. Through this object you may send even objects from one script to another: Interesting! lexikos' ObjRegisterActive method is also very cool. It...
by FanaticGuru
18 Nov 2017, 01:34
Forum: Ask For Help
Topic: merging 2 arrays
Replies: 7
Views: 150

Re: merging 2 arrays

Merging arrays: #singleInstance force #persistent #include *i <Lib_1> array1:=[1,2,3,4,5] array2:=[2,4,6] loop % array2.length() ; iterate through the array2 array1.push(array2.pop()) ; remove the last entry of array2 and put it at the end of array1 ; display array1 out:= for i,a in array1 out.=a m...

Go to advanced search