Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Created December 26, 2021 00:49
Show Gist options
  • Save JoeGlines/ed6e10ef0afbfa4d403a6366cee24d7d to your computer and use it in GitHub Desktop.
Save JoeGlines/ed6e10ef0afbfa4d403a6366cee24d7d to your computer and use it in GitHub Desktop.
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
; This code was orinated by Maestrith for Joe Glines and Hellbent
;**************************************
NumbImages:=50
NumbLoops:=100
#SingleInstance,Force
Gui,Add,ActiveX,w800 h500 vwb,mshtml:
;********************Generate The images***********************************
loop, % NumbImages {
img:=wb.CreateElement("img") ;~ img.ID:=A_Index
img.src:="C:\Windows\IdentityCRL\WLive48x48.png" ;If not work, update path to a small png that you have
wb.Body.AppendChild(img)
img.style.position:="absolute"
}
Gui,Show
ComObjError(0)
images:=wb.images
;********************Randomize the locations of the images***********************************
Loop,% NumbLoops{
while(ii:=images[a_index-1]){
random,x,0,800
random,y,0,500
ii.style.left:=x "px"
ii.style.top:=y "px"
}
Sleep, 100 ;Slow it down a bit
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment