Search found 803 matches

by FanaticGuru
15 Dec 2017, 15:05
Forum: Ask For Help
Topic: A Quarry Regarding M S Excel Com Object. Needs Help.
Replies: 4
Views: 66

Re: A Quarry Regarding M S Excel Com Object. Needs Help.

f1:: xl2:= ComObjGet("C:\Users\htc\Desktop\book2.xlsx") MsgBox % xl2.sheets("sheet1").range("a1").value return in the above codes i have specified the excel workbook by providing full path. moreover i have also specified the sheet number. Could you please tell me any b...
by FanaticGuru
14 Dec 2017, 19:12
Forum: Ask For Help
Topic: A Quarry Regarding M S Excel Com Object. Needs Help.
Replies: 4
Views: 66

Re: A Quarry Regarding M S Excel Com Object. Needs Help.

In general it is a bad idea to use ComObjGet when working with Excel. The main problem is that ComObjGet does not return an application object like ComObjCreate or ComObjActive. It returns a Workbook object which is not as versatile. For your case a workbook does not have an activecell. An applicati...
by FanaticGuru
13 Dec 2017, 13:52
Forum: Ask For Help
Topic: Have a coding challenge. Need help with a particular way I want a script to work, if possible. [twitch/email/schedules]
Replies: 7
Views: 94

Re: Have a coding challenge. Need help with a particular way I want a script to work, if possible. [twitch/email/schedul

The email part is relatively easy if you have Outlook installed. Outlook is easy to communicate with programmatically to send emails in the background. Getting the status from Twitch is the harder part. You have to create an OAuth token which requires setting up an account and a bunch of hoops. That...
by FanaticGuru
12 Dec 2017, 17:58
Forum: Scripts and Functions
Topic: [Function] Min/Max including with Associative Arrays
Replies: 6
Views: 234

Re: [Function] Min/Max including with Associative Arrays

In v1, this is OK Min({"0":1, 1:2}*) , but not in v2. Hence, for associative arrays, to be certain, one would need to pass the array rather than expand* it. Alternative function definition could be, Min(List) and the either call it like Min(array) if you have an ar...
by FanaticGuru
12 Dec 2017, 14:01
Forum: Offtopic
Topic: Code Puzzle Thread
Replies: 74
Views: 8625

Re: Code Puzzle Thread

Awesome tractates! One think I still don't understand. Why count to two? Why not just simply use X:=List[2] instead?, knowing what is at the second place. And then why would X:="abcd 1" break the function? Any way I do understand this things a bit better now. Bye! P.s.: In FG's superior s...
by FanaticGuru
11 Dec 2017, 19:15
Forum: Ask For Help
Topic: Accessing Outlook 2016 Message Properties W10x64 Topic is solved
Replies: 5
Views: 88

Re: Accessing Outlook 2016 Message Properties W10x64 Topic is solved

Here is the code I tried... #Persistent ; Keeps script permanently running #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #SingleInstance force ; Ensures that only the last executed instance of script is running SendMode Input ; Send becomes SendInput - Reco...
by FanaticGuru
11 Dec 2017, 14:32
Forum: Scripts and Functions
Topic: [Function] Min/Max including with Associative Arrays
Replies: 6
Views: 234

Re: [Function] Min/Max including with Associative Arrays

Updated: 2017 12 11

Improved the performance of the functions in first post with the help of Helgef.

FG
by FanaticGuru
11 Dec 2017, 13:59
Forum: Offtopic
Topic: Code Puzzle Thread
Replies: 74
Views: 8625

Re: Code Puzzle Thread

Here is my solution. Min(List*) { ; https://autohotkey.com/boards/viewtopic.php?f=6&t=40898 by FanaticGuru Enum := List._NewEnum(), Enum.Next(Y), Enum.Next(,X) for key, element in List ; This line is not allowed to be modified. if (element < X) ; This line is not allowed to be modified. X := ele...
by FanaticGuru
11 Dec 2017, 13:35
Forum: Ask For Help
Topic: Accessing Outlook 2016 Message Properties W10x64 Topic is solved
Replies: 5
Views: 88

Re: Accessing Outlook 2016 Message Properties W10x64 Topic is solved

Below is code that will get an Outlook Item that then can be used to get all the available information about that item. F12:: olApp := ComObjActive("Outlook.Application") try olItem := olApp.ActiveWindow.CurrentItem catch olItem := olApp.ActiveExplorer.Selection.Item(1) MsgBox % olItem.Sub...
by FanaticGuru
08 Dec 2017, 13:09
Forum: Ask For Help
Topic: MS Word: duplicate line
Replies: 6
Views: 98

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

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

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

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

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

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: 6
Views: 234

[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: 2262

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

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

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

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...

Go to advanced search