AutoHotkey Community

It is currently May 27th, 2012, 6:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: August 1st, 2011, 4:30 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
This one uses only AHK Keywords, inspired by one of the japh entries.
it outputs JAAH because writing this for 30 chars would bore me...
Code:
MsgBox % Chr(((true+(not false))<<(((true xor false))/(true+true)))+(true xor false))
. Chr((true+(not false))**((true << (true + true))+(true<<true))+true)
. Chr((true+true)**((true << (true + true))+(true<<true))+true)
. Chr(true+((true<<true+true+true)-1)*(true xor false)+(not false))
it is technically one line, and I see no way someone could get past 'it prints 4 characters' without running it.

For anyone interested in trying this challenge, I suggest you nest Chr() functions like this:
Code:
MsgBox % Chr(Chr(0x31) Chr(0x30) Chr(48))

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2011, 4:41 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
nimda wrote:
For anyone interested in trying this challenge, I suggest you nest Chr() functions like this:
(...)

It reminds me of a similar technique that I used in my obfuscated AHK Basic detector:
Code:
...
ÒÆÞ:=cHr(Chr(54)cHR(55))CHR(chr(49)ChR(48)cHr(52))cHR(CHr(56)ChR(50))
,Ίè:=%ÒÆÞ%(%ÒÆÞ%(57)%ÒÆÞ%(55))%ÒÆÞ%(%ÒÆÞ%(56)%ÒÆÞ%(51))%ÒÆÞ%(%ÒÆÞ%(54)%ÒÆÞ%(55))
...

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2011, 4:42 pm 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
Hey, post 1000! Grats!
Here's another nifty thing:
Code:
MsgBox % Chr(true true true)
How true!

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 10:16 pm 
Offline

Joined: January 7th, 2009, 7:03 pm
Posts: 43
Code:
UrlDownloadToFile, http://www.dev-x.org/jaah.gif, %A_Temp%\jaah.gif
Gui, -Caption +ToolWindow
Gui, Add, Picture,, %A_Temp%\jaah.gif
Gui, Show


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 11:00 pm 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
7 lines, makes blinking text in Firefox:
Code:
ShareText = Just Another AutoHotkey Hacker
File = %A_ScriptDir%\%ShareText%.html
html = <!DOCTYPE html>`n<html>`n<head><style type="text/css">`nbody {background-color:#222222; font-size:400`%; color:#999999}</style></head>`n<body>`n<p><blink>%ShareText%</blink></p>`n</body></html> ; this is one line wrapped
FileDelete, %File%
FileAppend, %html%, %File%
Run, %File%
ExitApp

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 11:16 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
@aaronbewza: don't use the <blink> tag, please; it's evil.

http://www.goer.org/Journal/2003/10/htm ... _n.html#26

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 11:22 pm 
Offline

Joined: July 6th, 2011, 5:37 pm
Posts: 214
Location: Looking over my domain
rofl
http://www.goer.org/htmlhorror/htmlhorror1.html


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2011, 11:48 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
When is was about 10, I took a HTML class and they refereed to <marque> as "cool". We actually had an assignment to make a webpage using it. :roll:

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2011, 1:37 am 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
LOLZ fincs :D Hey! I use Scite to code stuff! Impressive... I love Scite.
Ok to make the HTML not as evil, I've used Frankie's veiled suggestion and have wrapped the 'blink' tag with a 'marquee' tag,
effectively cloaking 'evil' with 'cute and cuddly'.
Added bonus: lets IE users experience at least some of that awesome old-school HTML-tag-war antiquity:
Code:
ShareText = Just Another AutoHotkey Hacker
File = %A_ScriptDir%\%ShareText%.html
html = <!DOCTYPE html>`n<html>`n<head><style type="text/css">`nbody {background-color:#222222; font-size:1200`%; color:#999999}</style></head>`n<body>`n<p><marquee><blink>%ShareText%</blink></marquee></p>`n</body></html> ; this is one line wrapped
FileDelete, %File%
FileAppend, %html%, %File%
Run, %File%
ExitApp

(I wouldn't actually use these tags for any CSS or HTML I actually build, they are indeed quite horrible lmao)

@ Zod... whoa! Is that the Brady Bunch website?

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2011, 3:21 am 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
What's with that ExitApp at the end :?:

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2011, 9:06 pm 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
Doesn't a script just kind of "hang" if there is no exit command? Of course that's an assumption I'm making...

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2011, 9:19 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
If the script isn't persistent, it closes when there's no more code to be run (end of the auto-execute section). Hotkeys, hotstrings, any Gui,... commands, putting the literal line #Persistent in the script, and onMessage (i think) all make the script persistent and then you have to call ExitApp to close the script.

To use your code as an example, it isn't needed there but it doesn't hurt anything. Either "return", "ExitApp" or "" (nothing) would do the same.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2011, 9:49 pm 
Offline

Joined: March 28th, 2010, 1:32 am
Posts: 681
Location: United States
Code:
; Binary Alphabet
01000001 = A
01000010 = B
01000011 = C
01000100 = D
01000101 = E
01000110 = F
01000111 = G
01001000 = H
01001001 = I
01001010 = J
01001011 = K
01001100 = L
01001101 = M
01001110 = N
01001111 = O
01010000 = P
01010001 = Q
01010010 = R
01010011 = S
01010100 = T
01010101 = U
01010110 = V
01010111 = W
01011000 = X
01011001 = Y
01011010 = Z

01100001 = a
01100010 = b
01100011 = c
01100100 = d
01100101 = e
01100110 = f
01100111 = g
01101000 = h
01101001 = i
01101010 = j
01101011 = k
01101100 = l
01101101 = m
01101110 = n
01101111 = o
01110000 = p
01110001 = q
01110010 = r
01110011 = s
01110100 = t
01110101 = u
01110110 = v
01110111 = w
01111000 = x
01111001 = y
01111010 = z

data =  %01001010%%01110101%%01110011%%01110100% %00100000%%01000001%%01101110%%01101111%%01110100%%01101000%%01100101%%01110010% %00100000%%01000001%%01110101%%01110100%%01101111%%01001000%%01101111%%01110100%%01101011%%01100101%%01111001% %00100000%%01001000%%01100001%%01100011%%01101011%%01100101%%01110010%

MsgBox, %data%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2011, 9:51 pm 
Offline

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
Use the GDI+ Library

Code:
pToken := Gdip_Startup()
Gui, 1:  -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop
Gui, 1: Show, NA
hw := WinExist()
obm := SelectObject(hdc := CreateCompatibleDC(), hbm := CreateDIBSection(w := A_ScreenWidth, h := A_ScreenHeight))
Gdip_SetSmoothingMode(G := Gdip_GraphicsFromHDC(hdc), 4)
pi := Gdip_CreateBitmap(w, h), Gi := Gdip_GraphicsFromImage(pi), po := Gdip_CreateBitmap(w, h)
o := Chr(74) Chr(117) Chr(115) Chr(116) Chr(32) Chr(65) Chr(110) Chr(111) Chr(116) Chr(104)
. Chr(101) Chr(114) Chr(32) Chr(65) Chr(117) Chr(116) Chr(111) Chr(72) Chr(111) Chr(116)
. Chr(107) Chr(101) Chr(121) Chr(32) Chr(72) Chr(97) Chr(99) Chr(107) Chr(101) Chr(114)
Gdip_TextToGraphics(Gi, o, "s80 Bold Center vCenter", "Arial", w, h)
UpdateLayeredWindow(hw, hdc, 0, 0, w, h)
m := "83EC388B4424485355568B74245C99F7FE8B5C244C8B6C2448578BF88BCA894C241C897C243485FF0F8E2E0300008B44245"
. "499F7FE897C24448944242833C089542418894424308944242CEB038D490033FF397C2428897C24380F8E750100008BCE0FAFC"
. "E894C24408DA4240000000033C03BF08944241089442460894424580F8E8A0000008B5C242C8D4D028BD52BD183C2038954242"
. "08D3CBB0FAFFE8BD52BD142895424248BD52BD103F9897C24148974243C8BCF8BFE8DA424000000008B5C24200FB61C0B03C30"
. "FB619015C24588B5C24240FB61C0B015C24600FB61C11015C241083C10483EF0175D38B7C2414037C245C836C243C01897C241"
. "475B58B7C24388B6C244C8B5C24508B4C244099F7F9894424148B44245899F7F9894424588B44246099F7F9894424608B44241"
. "099F7F98944241085F60F8E820000008D4B028BC32BC18D68038B44242C8D04B80FAFC68BD32BD142895424248BD32BD103C18"
. "944243C89742420EB038D49008BC88BFE0FB64424148B5C24248804290FB644245888010FB644246088040B0FB644241088040"
. "A83C10483EF0175D58B44243C0344245C836C2420018944243C75BE8B4C24408B5C24508B6C244C8B7C2438473B7C2428897C2"
. "4380F8C9FFEFFFF8B4C241C33D2395424180F846401000033C03BF2895424108954246089542458895424148944243C0F8E820"
. "00000EB0233D2395424187E6F8B4C243003C80FAF4C245C8B4424280FAFC68D550203CA8D0C818BC52BC283C003894424208BC"
. "52BC2408BFD2BFA8B54241889442424895424408B4424200FB614080FB601015424148B542424014424580FB6040A0FB614390"
. "14424600154241083C104836C24400175CF8B44243C403BC68944243C7C808B4C24188B4424140FAFCE99F7F9894424148B442"
. "45899F7F9894424588B44246099F7F9894424608B44241099F7F98944241033C08944243C85F60F8E7F000000837C2418007E6"
. "F8B4C243003C80FAF4C245C8B4424280FAFC68D530203CA8D0C818BC32BC283C003894424208BC32BC2408BFB2BFA8B5424188"
. "9442424895424400FB64424148B5424208804110FB64424580FB654246088018B4424248814010FB654241088143983C104836"
. "C24400175CF8B44243C403BC68944243C7C818B4C241C8B44245C0144242C01742430836C2444010F85F4FCFFFF8B44245499F"
. "7FE895424188944242885C00F8E890100008BF90FAFFE33D2897C243C8954245489442438EB0233D233C03BCA8954241089542"
. "4608954245889542414894424400F8E840000003BF27E738B4C24340FAFCE03C80FAF4C245C034C24548D55028BC52BC283C00"
. "3894424208BC52BC2408BFD03CA894424242BFA89742444908B5424200FB6040A0FB611014424148B442424015424580FB6140"
. "80FB6040F015424600144241083C104836C24440175CF8B4424408B7C243C8B4C241C33D2403BC1894424400F8C7CFFFFFF8B4"
. "4241499F7FF894424148B44245899F7FF894424588B44246099F7FF894424608B44241099F7FF8944241033C08944244085C90"
. "F8E8000000085F67E738B4C24340FAFCE03C80FAF4C245C034C24548D53028BC32BC283C003894424208BC32BC2408BFB03CA8"
. "94424242BFA897424448D49000FB65424148B4424208814010FB65424580FB644246088118B5424248804110FB644241088043"
. "983C104836C24440175CF8B4424408B7C243C8B4C241C403BC1894424407C808D04B50000000001442454836C2438010F858CF"
. "EFFFF33D233C03BCA89542410895424608954245889542414894424440F8E9A000000EB048BFF33D2395424180F8E7D0000008"
. "B4C24340FAFCE03C80FAF4C245C8B4424280FAFC68D550203CA8D0C818BC52BC283C003894424208BC52BC240894424248BC52"
. "BC28B542418895424548DA424000000008B5424200FB6140A015424140FB611015424588B5424240FB6140A015424600FB6140"
. "10154241083C104836C24540175CF8B4424448B4C241C403BC1894424440F8C6AFFFFFF0FAF4C24188B44241499F7F98944241"
. "48B44245899F7F9894424588B44246099F7F9894424608B44241099F7F98944241033C03944241C894424540F8E7B0000008B7"
. "C241885FF7E688B4C24340FAFCE03C80FAF4C245C8B4424280FAFC68D530203CA8D0C818BC32BC283C003894424208BC32BC24"
. "08BEB894424242BEA0FB65424148B4424208814010FB65424580FB644246088118B5424248804110FB644241088042983C1048"
. "3EF0175D18B442454403B44241C894424547C855F5E5D33C05B83C438C3"
VarSetCapacity(p, StrLen(m)//2)
Loop % StrLen(m)//2      ;%
   NumPut("0x" SubStr(m, 2*A_Index-1, 2), p, A_Index-1, "char")
Loop
{
   v := dir ? ((v+1 > 30) ? 30 : v+1) : ((v-1 < 0) ? 0 : v-1), dir := (v = 0 || v = 30) ? !dir : dir
   E1 := Gdip_LockBits(pi, 0, 0, w, h, st1, sc1, bd1), E2 := Gdip_LockBits(po, 0, 0, w, h, st2, sc2, bd2)
   E := DllCall(&p, "uint", sc1, "uint", sc2, "int", w, "int", h, "int", st1, "int", v)
   Gdip_UnlockBits(pi, bd1), Gdip_UnlockBits(po, bd2)
   Gdip_DrawImage(G, po)
   UpdateLayeredWindow(hw, hdc)
   Gdip_GraphicsClear(G)
   Sleep, 50
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 7th, 2011, 9:14 am 
Code:
x=41726520796F753A204A75737420416E6F74686572204175746F486F746B6579204861636B65723F
Loop % StrLen(x)/2
 s .=  Chr("0x" SubStr(x,(A_Index-1)*2+1, 2)) ; HT various String2Hex/Hex2String functions posted on the forum
MsgBox,16420,% s, % s


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, jepjep24 and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group