Browser automation could most certainly be a topic! That would have many interesting results, I'm sure! I'll make a note
@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?
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 29 Nov 2017, 04:56
by BoBo
Communication breakdown
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 30 Nov 2017, 20:12
by Masonjar13
It's time for the topic announcement! Apologies for the hour delay, I forgot to compensate for DST
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.
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 04:00
by just me
Auto-clicking! And the prize: "The top 3 winners will get Steam/UPlay game keys of incremental value."
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 04:34
by jeeswg
I'd better watch that film Click, to give me some ideas. Is the film any good?
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 05:28
by Masonjar13
just me wrote:
I presume you didn't read the rules? 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?
Never seen it. Though, it has a below-average rating, so probably not.
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 05:31
by nnnik
just me wrote:Auto-clicking! And the prize: "The top 3 winners will get Steam/UPlay game keys of incremental value."
Talking about games when you have no idea about gaming
Spoiler
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 14:18
by Capn Odin
You will never again need to click manually, with this one simple entry.
Loop {
A.(U,T,O,_,C,L,I,C.K,I,N,G) ; dynamic call using the deprecated dot style notation. A - among others - is defined as a global variable at the static call of g below
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 ; ex. 68767667657676 gives 7 i.e. StrLen("DllCall")
while (n--)
string .= %v%(SubStr(arguments, 2*i+1, 2)), i++, O := O + ((O - 2) ? -2 : 2) ; Chr(68) > D, Chr(76) > L, Chr(76) > L... | as for O MOUSEEVENTF_LEFTDOWN=2 and MOUSEEVENTF_LEFTUP=4
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) ; 'int'
a := f(68767667657676) ; 'dllcall'
u := f(7779858369) . f(956986697884) ; 'mouse_event'
(c:={}).k := t := f(85737884) ; 'unit'
}
Can we say that it is at least more readable? No comments needed: the script speak for itself
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 21:13
by Capn Odin
A_AhkUser wrote:Can we say that it is at least more readable? No comments needed: the script speak for itself
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)
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 01 Dec 2017, 23:50
by Masonjar13
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
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!
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 02 Dec 2017, 18:26
by A_AhkUser
@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 viadllcall, 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...
@Masonjar13 I "prettified" it... However, jslint still says it is unable to finish - any ideas?
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 03 Dec 2017, 13:45
by Masonjar13
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?
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 04 Dec 2017, 02:18
by Capn Odin
I am sorry Masonjar13, that my entry is so good that no one else dares submit one.
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 04 Dec 2017, 04:38
by Micromegas
Oh, don't worry about that, Capn Odin, there's always rule #5; that sounds like a good enough reason to invoke it.
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 04 Dec 2017, 07:01
by waetherman
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.
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.
Re: AHKathon! [AHK Hackathon] 12/17
Posted: 04 Dec 2017, 09:25
by Micromegas
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?