AHKathon! [AHK Hackathon] 12/17

Talk about anything
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AHKathon! [AHK Hackathon] 12/17

17 Nov 2017, 09:50

AHKBigglier.png
AHKBigglier.png (83.4 KiB) Viewed 5329 times
:mrgreen:
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

18 Nov 2017, 01:05

Browser automation could most certainly be a topic! That would have many interesting results, I'm sure! I'll make a note :thumbup:

@Capn Odin, don't sell yourself short; you've done great work on here :) and sometimes creativity doesn't show up in a typical manner.. ;) Good luck with your assignment!

Bigglier, you say? :lol:
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AHKathon! [AHK Hackathon] 12/17

29 Nov 2017, 04:56

Image
Communication breakdown :lolno:
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

30 Nov 2017, 20:12

It's time for the topic announcement! Apologies for the hour delay, I forgot to compensate for DST :oops:

Anyways, the first topic will be something that I typically start with when teaching people AutoHotkey, due to the simplicity and room for extra creativity: Auto-clicking!

As mentioned, the script simply needs to be based around the concept. Please be sure not to break any of the rules posted on the OP to avoid being disqualified! No further entries will be allowed after Friday, December 8th @ 11:59pm UTC, so be sure to get them in before that time!

Also a note: if someone wishes to participate, but does not want to be eligible for the prize, simply state so in your entry. I'll still score it, and I'll leave a mention if it qualified for a prize when posting winners.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
just me
Posts: 9407
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 04:00

Auto-clicking! And the prize: "The top 3 winners will get Steam/UPlay game keys of incremental value." :facepalm:
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 04:34

I'd better watch that film Click, to give me some ideas. Is the film any good?
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 05:28

just me wrote: :facepalm:
I presume you didn't read the rules? :roll: Plenty of other uses to be made of the topic, and it's about code design, anyway.

Being serious though, I trust you have something better to do than complain about your morals not being met, yes?
jeeswg wrote:I'd better watch that film Click, to give me some ideas. Is the film any good?
:lol: Never seen it. Though, it has a below-average rating, so probably not.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 05:31

just me wrote:Auto-clicking! And the prize: "The top 3 winners will get Steam/UPlay game keys of incremental value." :facepalm:
Talking about games when you have no idea about gaming :facepalm:
Spoiler
Recommends AHK Studio
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 14:18

You will never again need to click manually, with this one simple entry.

Code: Select all

loop {
	Click
}
Last edited by Capn Odin on 02 Dec 2017, 12:51, edited 1 time in total.
Please excuse my spelling I am dyslexic.
User avatar
waetherman
Posts: 112
Joined: 05 Feb 2016, 17:00

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 16:05

Capn Odin wrote:You will never again need to click manually, with this one simple script.

Code: Select all

loop {
	Click
}
I modified your code a lil bit:

Code: Select all

#NoEnv
SendMode Input
SetBatchLines -1

CoordMode Mouse, Client
send #r
WinWait Run ahk_class #32770 ahk_exe explorer.exe
send mspaint{Enter}
WinWait Untitled - Paint ahk_class MSPaintApp ahk_exe mspaint.exe
send ^w
WinWait Resize and Skew ahk_class #32770 ahk_exe mspaint.exe
send {right}{Tab}400{Tab}{Tab}{Space}+{Tab}400{Enter}
WinWaitActive Untitled - Paint ahk_class MSPaintApp ahk_exe mspaint.exe
start := A_TickCount
OFFSET_X := 5
OFFSET_Y := 152
DIAMETER := 250
CENTER_X := OFFSET_X + 200
CENTER_Y := OFFSET_Y + 200
STEPS := 1000
MouseMove, % CENTER_X, % CENTER_Y, 0
send ^{NumpadAdd}^{NumpadAdd}^
send {Lbutton down}

Loop 2 {
	offset := A_Index - 1
	Loop % STEPS {
		if (offset == 0) {
			baseval := A_Index
		} else {
			baseval := STEPS - A_Index + 1
		}
		angle := baseval * 0.1337
		distance := DIAMETER/2 * (baseval/STEPS)
		distance -= offset*8
		x := CENTER_X + Sin( angle ) * distance
		y := CENTER_Y + Cos( angle ) * distance
		MouseMove, %x%, %y%, 0
		if ( Mod(A_Index, 2) ) {
			send {Lbutton up}
		} else {
			send {Lbutton down}
		}
	}
}
send {Lbutton up}
exitapp

esc::
pause::
	exitapp
Image
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 17:25

nnnik wrote:
just me wrote:Auto-clicking! And the prize: "The top 3 winners will get Steam/UPlay game keys of incremental value." :facepalm:
Talking about games when you have no idea about gaming :facepalm:
Spoiler
Exactly what I pray, day - after - day - after day : stop playing games !! :mrgreen: (I'll go with #4!)
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 20:37

Entries will be judged on performance, UI, ease of use, and readability
:headwall:

Code: Select all

Loop {
	A.(U,T,O,_,C,L,I,C.K,I,N,G)
	A.(U,T,O,_,C,L,I,C.K,I,N,G)
	sleep, 1000
}
return

f(arguments:="") {
local string, i, n
n := StrLen(arguments+(i:=!!(string:=""))) // 2
while (n--)
	string .= %v%(SubStr(arguments, 2*i+1, 2)), i++, O := O + ((O - 2) ? -2 : 2)
return (string) ? (%w%(%v%(123) . %v%(58) . %v%(76) . %v%(125), string)) : 0
}
g() {
static dummy := g()
global a,u,t,o,_,c,l,i,k,n,g,v,w

	v :="chr", w:="format"
	o := (i := g := f() + 4)
	_ := l := n := f(737884)
	a := f(68767667657676)
	u := f(7779858369) . f(956986697884)
	(c:={}).k := t := f(85737884)
	
}
Spoiler
Can we say that it is at least more readable? No comments needed: the script speak for itself :lol:
Last edited by A_AhkUser on 02 Dec 2017, 18:25, edited 1 time in total.
my scripts
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 21:13

A_AhkUser wrote:Can we say that it is at least more readable? No comments needed: the script speak for itself :lol:
I am at a loss, I can't find the place where you do the DllCall("mouse_event"). (In my defense it is fairly late here, and I am not on my medication)
Please excuse my spelling I am dyslexic.
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

01 Dec 2017, 23:50

waetherman wrote:I modified your code a lil bit
Just a tad ;) I quite like how concise it is, actually.
A_AhkUser wrote:Can we say that it is at least more readable?
This is for AutoHotkey, not minimized JS :lol:

Notice: I changed the participation portion slightly. So on your entries, please state it as being your entry at the top of your post. Thanks!
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

02 Dec 2017, 18:26

@Capn Odin I know it's hard to fool insight of ahksuperstars; once one is able to see that this relies on mouse_event function via dllcall, it's done. Btw, saying that the script speak for itself I had in mind the fact that without any comments one can still guess this will go auto-clicking since the call borrow the letters of the theme to perform the dllcall and only after I realized that one can also see some irony seeing how the script is written... :terms: :lol:

@Masonjar13 I "prettified" it... However, jslint still says it is unable to finish - any ideas? :lol:
my scripts
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

03 Dec 2017, 13:45

A_AhkUser, that took me a while to comprehend.. It's really quite clever. And unable to finish? In the sense that it's an indefinite loop? :P
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: AHKathon! [AHK Hackathon] 12/17

04 Dec 2017, 02:18

I am sorry Masonjar13, that my entry is so good that no one else dares submit one.
Please excuse my spelling I am dyslexic.
User avatar
Micromegas
Posts: 260
Joined: 28 Apr 2015, 23:02
Location: Germany

Re: AHKathon! [AHK Hackathon] 12/17

04 Dec 2017, 04:38

Oh, don't worry about that, Capn Odin, there's always rule #5; that sounds like a good enough reason to invoke it. :lol:
User avatar
waetherman
Posts: 112
Joined: 05 Feb 2016, 17:00

Re: AHKathon! [AHK Hackathon] 12/17

04 Dec 2017, 07:01

Micromegas wrote:Oh, don't worry about that, Capn Odin, there's always rule #5; that sounds like a good enough reason to invoke it. :lol:
Such rules are actually great to demotivate people from putting too much effort in their participation. I mean, for example, I wanted to try and make as good enry as Captain's, but I'm not going to lose my time if I can get disqualified for some absurd reason like "entry too simple" or something like that.
Image
User avatar
Micromegas
Posts: 260
Joined: 28 Apr 2015, 23:02
Location: Germany

Re: AHKathon! [AHK Hackathon] 12/17

04 Dec 2017, 09:25

waetherman wrote:Such rules are actually ...
OK, it seems it's time for a serious discussion. When you write "actually", do you actually have anything to back up your claim, such as a scientific study or some concrete real-life experience, or is it just your gut feel? Or do you mean that you yourself are feeling demotivated by this rule?

Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 33 guests