Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Script] tomoe_uehara's home made =)


  • Please log in to reply
69 replies to this topic
TheGreatSwami Woo
  • Members
  • 237 posts
  • Last active: Jan 22 2012 03:31 PM
  • Joined: 26 May 2011
Hmm, personality plus script. the buttons were not big enough to show the full words - I would get adventour instead of adventurous

tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
Posted Image
That's weird, because the width is 280 and it's large enough to contain those words :?

TheGreatSwami Woo
  • Members
  • 237 posts
  • Last active: Jan 22 2012 03:31 PM
  • Joined: 26 May 2011
I know it is weird
Posted Image

tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
[GDI+] Colored border around active window
/*
AutoHotkey Version: 1.x
Language:	English
Platform:	Win9x/NT
Author:		tomoe_uehara
Script Function:
	Draws colored border around active window.
	I got the idea from this post [http]
Date of Creation:
	10/09/2011 - 02:25:33
*/

#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%

; ------- Configurable Section -------
BorderOpacity = FF
BorderWidth = 10
Interval = 500	; in milisecond
; ------------------------------------
BorderColor = FF0000
Max = 255
a2=0
a3=0

SetTimer, UPDATEDSCRIPT,1000
SetTimer, Check, 10
SetTimer, ChangeColor, %Interval%
If !pToken := Gdip_Startup() 
{ 
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system 
   ExitApp 
} 
OnExit, Exit 
Width := A_ScreenWidth, Height := A_ScreenHeight 
Gui, 1: -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop
Gui, 1: Show, NA, Gui98
WinSet, ExStyle, +0x20, Gui98
hwnd1 := WinExist() 
hbm := CreateDIBSection(Width, Height) 
hdc := CreateCompatibleDC() 
obm := SelectObject(hdc, hbm) 
G := Gdip_GraphicsFromHDC(hdc)
Gdip_SetSmoothingMode(G, 4) 
Gdip_GraphicsClear(G)

Draw:
MyPen = 0x%BorderOpacity%%BorderColor% 
pPen := Gdip_CreatePen(MyPen, BorderWidth)
WinGetPos, xx, yy, ww, hh, A
currentx := xx
currenty := yy
x4 := ww
y4 := hh

DrawRectangle:
Gdip_DrawRectangle(G, pPen, xx, yy, x4, y4)
/*
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
Line2:	;right
Gdip_DrawLine(G, pPen, x2, y2, x4, y4)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
Line3:	;left
Gdip_DrawLine(G, pPen, xx, yy, x3, y3)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
Line4:	;bottom
Gdip_DrawLine(G, pPen, x3, y3, x4, y4)
*/
Gdip_DeletePen(pPen)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
return

Redraw:
Gdip_GraphicsClear(G)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
Goto Draw

Check:
WinGetPos, xx2, yy2,,, A
if (currentx != xx2) or (currenty != yy2)
{
	currentx := xx2
	currenty := yy2
	gosub Redraw
}
return

esc::        ; Press esc to exit 
Exit: 
SelectObject(hdc, obm) 
DeleteObject(hbm) 
DeleteDC(hdc) 
Gdip_DeleteGraphics(G) 
Gdip_Shutdown(pToken) 
ExitApp 
Return

;A subroutine from ColorSlider [http]
ChangeColor:
aa++
if aa > 300
aa = 1
n := Round(max/50,0)
if aa between 1 and 50
{
a1 := Color(max)
ab := aa*n
a2 := Color(ab)
a3 := Color(0)
}
if aa between 51 and 100
{
a2 := Color(max)
ab := (max-aa)*n
a1 := Color(ab)
a3 := Color(0)
}
if aa between 101 and 150
{
a2 := Color(max)
ab := (aa-100)*n
a3 := Color(ab)
a1 := Color(0)
}
if aa between 151 and 200
{
a3 := Color(max)
ab := (max-(aa-150))*n
a2 := Color(ab)
a1 := Color(0)
}
if aa between 201 and 250
{
a3 := Color(max)
ab := (aa-200)*n
a1 := Color(ab)
a2 := Color(0)
}
if aa between 251 and 300
{
a1 := Color(max)
ab := (max-(aa-250))*n
a3 := Color(ab)
a2 := Color(0)
}
BorderColor = %a1%%a2%%a3%
goto Redraw

Color(N) { 					; Function borrowed from Wicked (http://www.autohotkey.com/forum/viewtopic.php?t=57368&postdays=0&postorder=asc&start=0)
   SetFormat, Integer, Hex 
   N += 0 
   SetFormat, Integer, D 
   StringTrimLeft, N, N, 2 
   If(StrLen(N) < 2) 
      N = 0%N%
   Return N 
}

UPDATEDSCRIPT: 
FileGetAttrib,attribs,%A_ScriptFullPath% 
IfInString,attribs,A 
{ 
FileSetAttrib,-A,%A_ScriptFullPath% 
;SplashTextOn,,,Updated script,
Sleep,500 
Reload 
} 
Return


tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
Extensive Winamp SendMessage List
/*
AutoHotkey Version: 1.x
Language:	English
Platform:	Win9x/NT
Author:		tomoe_uehara
Script Function:
		Winamp SendMessage list - in GUI
Date of Creation:
	10/11/2011 - 00:23:25
*/


#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTimer,UPDATEDSCRIPT, 1000

; You can remove those Color and Font to revert the color to default.
Gui, Color, 000000, 000000
Gui, Font, c00FF00
Gui, Add, Button, x12 y370 w520 h40 Default gGo, Execute !!
Gui, Add, Listbox, x30 y50 w180 h300 vList gRefresh
Gui, Add, Text, x230 y50, Code:
Gui, Add, Edit, x220 y65 w300 vCodebox ReadOnly
Gui, Add, Text, x230 y100 w300 vzz1, Value:
Gui, Add, Edit, x220 y115 w100 vzz2
Gui, Add, Text, x230 y150 w300 vzz3, Available Options:
Gui, Add, Edit, x220 y165 w300 h176 vzz4 
Loop, 11
{
xx := 200+(A_Index*26)
Gui, Add, Slider, x%xx% y110 h200 Page10 TickInterval3 Range0-63 Tooltip Vertical vEQ%A_Index%
}
Gui, Add, Tab, x12 y10 w520 h350 vTab AltSubmit gSave, General|Basic Operation|Playlist|Equalizer|Time|Volume|Plugin|Not implemented yet
Loop, 11
GuiControl, Hide, EQ%A_Index%
Loop, 4
GuiControl, Hide, zz%A_Index%
; Generated using SmartGUI Creator for SciTE
Gui, Show,, Extensive Winamp SendMessage List
Gosub Save
return

GuiClose:
ExitApp
return

Save:
Gui, Submit, NoHide
if Tab = 1
GuiControl,, List, |GetVersion|GetInfo|RestartWinamp|CloseWinamp|EnableDisableAllWindows|DisableExit|EnableExit|IsExitEnabled|GetHWND|ShowWND|HideWND|OpenMenu|PopupList|IsInetAvailable|IsWNDVisible|IsDoubleSize|IsVisRunning|IsWinshade|IsAOT|IsRecyclebin|AboutToggle|SelectSkin|AOTToggle|DoublesizeToggle|MainWindowToggle|MinibrowserToggle
if Tab = 2
GuiControl,, List, |Previous|Play|Pause|Stop|Next|GetShuffle|SetShuffle|GetRepeat|SetRepeat|Rewind|FastForward|FastForward5s|Rewind5s|FadeOutStop|StopAfterCurrentTrack|AddBookmarks|PlayAudioCD|IsPlaying|RepeatToggle|ShuffleToggle|Button1Shift|Button2Shift|Button3Shift|Button4Shift|Button5Shift|Button1Ctrl|Button2Ctrl|Button3Ctrl|Button4Ctrl|Button5Ctrl
if Tab = 3
GuiControl,, List, |PlaylistToggle|ClearPlaylist|SetPlaylistPos|GetPlaylistLength|GetPlaylistPos|PlaylistToggle|PlaylistGotoTop|PlaylistGotoBottom|PlaylistPrevious10Tracks|GetManualPlaylistAdvance|SetManualPlaylistAdvance|OpenFileBox|OpenDirBox|OpenURLBox|FileInfo
if Tab = 4
{
GuiControl,, List, |GetEQData|SetEQData|EQLoadPreset|EQSaveAs|EQWindowToggle|IsEQActivated|IsEQAutoloadON
Loop, 11
{
GuiControl, Show, EQ%A_Index%
}
}
if Tab = 5
GuiControl,, List, |GetElapsedTime|GetTrackLength|GetTimeDisplayMode|JumpToTime|DisplayElapsed|DisplayRemain|JTT|JTF
if Tab = 6
GuiControl,, List, |Volumeup|Volumedown|SetVolume|GetVolume|SetBalance
if Tab = 7
GuiControl,, List, |ExecPlugin|StartVisPlugin|VisOptions|VisPlugin|VisPluginCfg|
if Tab = 8
GuiControl,, List, |PlayFile|StartPlay|ChDir|WritePlaylist|IsFullStop|GetSkin|SetSkin|AddBookmark|GetPlaylistFile|GetPlaylistTitle|GetPlayingTitle
if Tab != 4
{
Loop, 11
GuiControl, Hide, EQ%A_Index%
}
GuiControl, Focus, List
GuiControl, Choose, List, 1
Gosub Refresh
return

Refresh:
Gui, Submit, NoHide
Loop, 4
GuiControl, Hide, zz%A_Index%
if List = GetVersion
GuiControl,, Codebox, SendMessage, 0x400,, 0,, ahk_class Winamp v1.x
if List = PlayFile
GuiControl,, Codebox, SendMessage, 0x4A, "`%value`%", 100,, ahk_class Winamp v1.x
if List = ClearPlaylist
GuiControl,, Codebox, SendMessage, 0x400,, 101,, ahk_class Winamp v1.x
if List = StartPlay
GuiControl,, Codebox, SendMessage, 0x400,, 102,, ahk_class Winamp v1.x
if List = ChDir
GuiControl,, Codebox, SendMessage, 0x4A,, 103,, ahk_class Winamp v1.x
if List = IsPlaying
GuiControl,, Codebox, SendMessage, 0x400,, 104,, ahk_class Winamp v1.x
if List = GetElapsedTime
GuiControl,, Codebox, SendMessage, 0x400, 0, 105,, ahk_class Winamp v1.x
if List = GetTrackLength
GuiControl,, Codebox, SendMessage, 0x400, 1, 105,, ahk_class Winamp v1.x
if List = JumpToTime
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 106,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Sets the position [in milliseconds] of the current song (approximately)
}
if List = WritePlaylist
GuiControl,, Codebox, SendMessage, 0x400,, 120,, ahk_class Winamp v1.x
if List = SetPlaylistPos
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 121,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Highlight your chosen position in Playlist
}
if List = SetVolume
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 122,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Set Volume (0-255)`nYou can use percentage as well (for example 50`%)
}
if List = GetVolume
GuiControl,, Codebox, SendMessage, 0x400, -666, 122,, ahk_class Winamp v1.x
if List = SetBalance
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 123,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Set balance (-127 = Left, 0 = Center, 127 = Right)`nYou can use percentage as well (for example -50`%)
}
if List = GetPlaylistLength
GuiControl,, Codebox, SendMessage, 0x400,, 124,, ahk_class Winamp v1.x
if List = GetPlaylistPos
GuiControl,, Codebox, SendMessage, 0x400,, 125,, ahk_class Winamp v1.x
if List = GetInfo
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 126,, ahk_class Winamp v1.x
if List = GetEQData
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 127,, ahk_class Winamp v1.x
Loop, 11
{
aa := A_Index-1
SendMessage, 0x400, %aa%, 127,, ahk_class Winamp v1.x
Value := ErrorLevel
Pos := A_Index+1
if Pos = 12
Pos = 1
GuiControl,, EQ%Pos%, %Value%
}
}
if List = IsEQActivated
GuiControl,, Codebox, SendMessage, 0x400, 11, 127,, ahk_class Winamp v1.x
if List = IsEQAutoloadON
GuiControl,, Codebox, SendMessage, 0x400, 12, 127,, ahk_class Winamp v1.x
if List = SetEQData
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 128,, ahk_class Winamp v1.x
if List = AddBookmark
GuiControl,, Codebox, SendMessage, 0x4A,, 131,, ahk_class Winamp v1.x
if List = RestartWinamp
GuiControl,, Codebox, SendMessage, 0x400, 0, 135,, ahk_class Winamp v1.x
if List = IsFullStop
GuiControl,, Codebox, SendMessage, 0x400,, 400,, ahk_class Winamp v1.x
if List = SetSkin
GuiControl,, Codebox, SendMessage, 0x400, "`%value`%", 200,, ahk_class Winamp v1.x
if List = GetSkin
GuiControl,, Codebox, SendMessage, 0x400,, 201,, ahk_class Winamp v1.x
if List = ExecPlugin
{
GuiControl,, Codebox, SendMessage, 0x400, "`%value`%", 202,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Specify your visualization dll here`nFor example: vis_avs.dll
}
if List = GetPlaylistFile
GuiControl,, Codebox, SendMessage, 0x400,, 211,, ahk_class Winamp v1.x
if List = GetPlaylistTitle
GuiControl,, Codebox, SendMessage, 0x400,, 212,, ahk_class Winamp v1.x
if List = IsInetAvailable
GuiControl,, Codebox, SendMessage, 0x400,, 242,, ahk_class Winamp v1.x
if List = GetShuffle
GuiControl,, Codebox, SendMessage, 0x400,, 250,, ahk_class Winamp v1.x
if List = GetRepeat
GuiControl,, Codebox, SendMessage, 0x400,, 251,, ahk_class Winamp v1.x
if List = SetShuffle
{
GuiControl,, Codebox, SendMessage, 0x400, [0/1], 252,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Specify 0 = off, 1 = on
}
if List = SetRepeat
{
GuiControl,, Codebox, SendMessage, 0x400, [0/1], 253,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Specify 0 = off, 1 = on
}
if List = EnableDisableAllWindows
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 259,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Specify 0 = Enable, 0xdeadbeef = Disable all windows`nWorks fine on classic skin, On Modern skin, it will only disable the playlist, so the user can't click on it.
}
if List = GetHWND
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 260,, ahk_class Winamp v1.x
if List = IsWNDVisible
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 261,, ahk_class Winamp v1.x
if List = OpenMenu
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 380,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, 1 = File Types`n9 = General Preferences`n20 = Winamp Pro`n21 = Titles`n22 = Classic Skins`n23 = Playlist`n24 = Video`n25 = Localization`n30 =  Plugins`n31 = Input`n32 = Output`n33 = Visualization`n34 = DSP/Effect`n35 = General Purpose`n40 = Skins`n41 = Station Info`n42 = Playback
}
if List = PopupList
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 361,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, 0 = Eject`n1 = Previous`n2 = Next`n3 = Pause`n4 = Play`n5 = Stop
}
if List = OpenURLBox
GuiControl,, Codebox, SendMessage, 0x400,, 360,, ahk_class Winamp v1.x
if List = OpenFileBox
GuiControl,, Codebox, SendMessage, 0x400,, 362,, ahk_class Winamp v1.x
if List = OpenDirBox
GuiControl,, Codebox, SendMessage, 0x400,, 363,, ahk_class Winamp v1.x
if List = ShowWND
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 600,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, 0 = EQ`n1 = Playlist`n2 = MiniBrowser`n3 = Video`n4 = Main window
}
if List = HideWND
{
GuiControl,, Codebox, SendMessage, 0x400, `%value`%, 601,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, 0 = EQ`n1 = Playlist`n2 = MiniBrowser`n3 = Video`n4 = Main window
}
if List = IsDoublesize
GuiControl,, Codebox, SendMessage, 0x400,, 608,, ahk_class Winamp v1.x
if List = GetTimeDisplayMode
GuiControl,, Codebox, SendMessage, 0x400, [0/1], 610,, ahk_class Winamp v1.x
if List = IsVisRunning
GuiControl,, Codebox, SendMessage, 0x400,, 613,, ahk_class Winamp v1.x
if List = GetManualPlaylistAdvance
GuiControl,, Codebox, SendMessage, 0x400,, 634,, ahk_class Winamp v1.x
if List = SetManualPlaylistAdvance
{
GuiControl,, Codebox, SendMessage, 0x400, [0/1], 635,, ahk_class Winamp v1.x
Loop, 4
GuiControl, Show, zz%A_Index%
GuiControl,, zz4, Set to 1 = on, 0 = off
}
if List = IsWinshade
GuiControl,, Codebox, SendMessage, 0x400,, 638,, ahk_class Winamp v1.x
if List = DisableExit
GuiControl,, Codebox, SendMessage, 0x400,, 647,, ahk_class Winamp v1.x
if List = EnableExit
GuiControl,, Codebox, SendMessage, 0x400,, 648,, ahk_class Winamp v1.x
if List = IsExitEnabled
GuiControl,, Codebox, SendMessage, 0x400,, 649,, ahk_class Winamp v1.x
if List = IsAOT
GuiControl,, Codebox, SendMessage, 0x400,, 650,, ahk_class Winamp v1.x
if List = IsRecyclebin
GuiControl,, Codebox, SendMessage, 0x400,, 651,, ahk_class Winamp v1.x
if List = GetSelectedItem
GuiControl,, Codebox, SendMessage, 0x400,, 3029,, ahk_class Winamp v1.x
if List = GetPlayingTitle
GuiControl,, Codebox, SendMessage, 0x400,, 3034,, ahk_class Winamp v1.x
if List = Previous
GuiControl,, Codebox, SendMessage, 0x111, 40044,,, ahk_class Winamp v1.x
if List = Play
GuiControl,, Codebox, SendMessage, 0x111, 40045,,, ahk_class Winamp v1.x
if List = Pause
GuiControl,, Codebox, SendMessage, 0x111, 40046,,, ahk_class Winamp v1.x
if List = Stop
GuiControl,, Codebox, SendMessage, 0x111, 40047,,, ahk_class Winamp v1.x
if List = Next
GuiControl,, Codebox, SendMessage, 0x111, 40048,,, ahk_class Winamp v1.x
if List = Rewind
GuiControl,, Codebox, SendMessage, 0x111, 40144,,, ahk_class Winamp v1.x
if List = FastForward
GuiControl,, Codebox, SendMessage, 0x111, 40148,,, ahk_class Winamp v1.x
if List = VolumeUp
GuiControl,, Codebox, SendMessage, 0x111, 40058,,, ahk_class Winamp v1.x
if List = VolumeDown
GuiControl,, Codebox, SendMessage, 0x111, 40059,,, ahk_class Winamp v1.x
if List = FastForward5s
GuiControl,, Codebox, SendMessage, 0x111, 40060,,, ahk_class Winamp v1.x
if List = Rewind5s
GuiControl,, Codebox, SendMessage, 0x111, 40061,,, ahk_class Winamp v1.x
if List = FadeOutStop
GuiControl,, Codebox, SendMessage, 0x111, 40147,,, ahk_class Winamp v1.x
if List = StopAfterCurrentTrack
GuiControl,, Codebox, SendMessage, 0x111, 40157,,, ahk_class Winamp v1.x
if List = StartVisPlugin
GuiControl,, Codebox, SendMessage, 0x111, 40192,,, ahk_class Winamp v1.x
if List = CloseWinamp
GuiControl,, Codebox, SendMessage, 0x111, 40001,,, ahk_class Winamp v1.x
if List = AddBookmarks
GuiControl,, Codebox, SendMessage, 0x111, 40321,,, ahk_class Winamp v1.x
if List = PlayAudioCD
GuiControl,, Codebox, SendMessage, 0x111, 40323,,, ahk_class Winamp v1.x
if List = PlaylistToggle
GuiControl,, Codebox, SendMessage, 0x111, 40040,,, ahk_class Winamp v1.x
if List = PlaylistGotoTop
GuiControl,, Codebox, SendMessage, 0x111, 40154,,, ahk_class Winamp v1.x
if List = PlaylistGotoBottom
GuiControl,, Codebox, SendMessage, 0x111, 40158,,, ahk_class Winamp v1.x
if List = PlaylistPrevious10Tracks
GuiControl,, Codebox, SendMessage, 0x111, 40197,,, ahk_class Winamp v1.x
if List = OpenURL
GuiControl,, Codebox, SendMessage, 0x111, 40155,,, ahk_class Winamp v1.x
if List = OpenFile
GuiControl,, Codebox, SendMessage, 0x111, 40029,,, ahk_class Winamp v1.x
if List = PreferencesToggle
GuiControl,, Codebox, SendMessage, 0x111, 40012,,, ahk_class Winamp v1.x
if List = FileInfo
GuiControl,, Codebox, SendMessage, 0x111, 40188,,, ahk_class Winamp v1.x
if List = VisOptions
GuiControl,, Codebox, SendMessage, 0x111, 40190,,, ahk_class Winamp v1.x
if List = VisPlugin
GuiControl,, Codebox, SendMessage, 0x111, 40191,,, ahk_class Winamp v1.x
if List = AboutToggle
GuiControl,, Codebox, SendMessage, 0x111, 40041,,, ahk_class Winamp v1.x
if List = JTT
GuiControl,, Codebox, SendMessage, 0x111, 40193,,, ahk_class Winamp v1.x
if List = JTF
GuiControl,, Codebox, SendMessage, 0x111, 40194,,, ahk_class Winamp v1.x
if List = SelectSkin
GuiControl,, Codebox, SendMessage, 0x111, 40219,,, ahk_class Winamp v1.x
if List = VisPluginCfg
GuiControl,, Codebox, SendMessage, 0x111, 40221,,, ahk_class Winamp v1.x
if List = EQLoadPreset
GuiControl,, Codebox, SendMessage, 0x111, 40253,,, ahk_class Winamp v1.x
if List = EQSaveAs
GuiControl,, Codebox, SendMessage, 0x111, 40254,,, ahk_class Winamp v1.x
if List = AOTToggle
GuiControl,, Codebox, SendMessage, 0x111, 40019,,, ahk_class Winamp v1.x
if List = DisplayElapsed
GuiControl,, Codebox, SendMessage, 0x111, 40037,,, ahk_class Winamp v1.x
if List = DisplayRemain
GuiControl,, Codebox, SendMessage, 0x111, 40038,,, ahk_class Winamp v1.x
if List = DoublesizeToggle
GuiControl,, Codebox, SendMessage, 0x111, 40165,,, ahk_class Winamp v1.x
if List = EQWindowToggle
GuiControl,, Codebox, SendMessage, 0x111, 40036,,, ahk_class Winamp v1.x
if List = MainWindowToggle
GuiControl,, Codebox, SendMessage, 0x111, 40258,,, ahk_class Winamp v1.x
if List = MinibrowserToggle
GuiControl,, Codebox, SendMessage, 0x111, 40298,,, ahk_class Winamp v1.x
if List = RepeatToggle
GuiControl,, Codebox, SendMessage, 0x111, 40022,,, ahk_class Winamp v1.x
if List = ShuffleToggle
GuiControl,, Codebox, SendMessage, 0x111, 40023,,, ahk_class Winamp v1.x
if List = Button1Shift
GuiControl,, Codebox, SendMessage, 0x111, 40144,,, ahk_class Winamp v1.x
if List = Button2Shift
GuiControl,, Codebox, SendMessage, 0x111, 40145,,, ahk_class Winamp v1.x
if List = Button3Shift
GuiControl,, Codebox, SendMessage, 0x111, 40146,,, ahk_class Winamp v1.x
if List = Button4Shift
GuiControl,, Codebox, SendMessage, 0x111, 40147,,, ahk_class Winamp v1.x
if List = Button5Shift
GuiControl,, Codebox, SendMessage, 0x111, 40148,,, ahk_class Winamp v1.x
if List = Button1Ctrl
GuiControl,, Codebox, SendMessage, 0x111, 40154,,, ahk_class Winamp v1.x
if List = Button2Ctrl
GuiControl,, Codebox, SendMessage, 0x111, 40155,,, ahk_class Winamp v1.x
if List = Button3Ctrl
GuiControl,, Codebox, SendMessage, 0x111, 40156,,, ahk_class Winamp v1.x
if List = Button4Ctrl
GuiControl,, Codebox, SendMessage, 0x111, 40157,,, ahk_class Winamp v1.x
if List = Button5Ctrl
GuiControl,, Codebox, SendMessage, 0x111, 40158,,, ahk_class Winamp v1.x
if List = PrevSong
GuiControl,, Codebox, SendMessage, 0x111, 40198,,, ahk_class Winamp v1.x
return

Go:
Gui, Submit, NoHide
var := zz2
Goto %list%
return

GetVersion:
SendMessage, 0x400,, 0,, ahk_class Winamp v1.x
GetVer := ErrorLevel
SetFormat, IntegerFast, hex
GetVer += 0
GetVer .= ""
SetFormat, IntegerFast, d
StringTrimLeft, GetVer, GetVer, 2
StringTrimLeft, ver2, GetVer, 1
StringLeft, ver1, GetVer, 1
MsgBox %Ver1%.%Ver2%
return

PlayFile:
;[Not implemented yet]
SendMessage, 0x4A, "F:\My File.mp3", 100,, ahk_class Winamp v1.x
return

ClearPlaylist:
;Clear the Playlist window
SendMessage, 0x400,, 101,, ahk_class Winamp v1.x
return

StartPlay:
;If Winamp = stop then play, if Winamp = play then restart at beginning of current file.
;Please use the 'normal' Play code instead.
SendMessage, 0x400,, 102,, ahk_class Winamp v1.x
return

ChDir:
;[Not implemented yet]
SendMessage, 0x4A,, 103,, ahk_class Winamp v1.x
return

IsPlaying:
;Get the current status of Winamp. 1 = Playing, 2 = Paused, 4 = Stopped
SendMessage, 0x400,, 104,, ahk_class Winamp v1.x
if ErrorLevel = 1
Status = playing
if Errorlevel = 3
Status = paused
if Errorlevel = 4
Status = stopped
MsgBox Winamp is %status%
return

GetElapsedTime:
;Get elapsed time of current file.
SendMessage, 0x400, 0, 105,, ahk_class Winamp v1.x
if ErrorLevel = -1
MsgBox Winamp is stopped
else
MsgBox % FormatSeconds(Round(Errorlevel/1000))
return

GetTrackLength:
;Get track length.
SendMessage, 0x400, 1, 105,, ahk_class Winamp v1.x
if ErrorLevel = -1
MsgBox Winamp is stopped
else
MsgBox % FormatSeconds(Errorlevel)
return

JumpToTime:
;Sets the position [in milliseconds] of the current song (approximately).
SendMessage, 0x400, %var%, 106,, ahk_class Winamp v1.x
return

WritePlaylist:
;writes the current playlist to <winampdir>\Winamp.m3u
;[Not implemented yet]
SendMessage, 0x400,, 120,, ahk_class Winamp v1.x
;MsgBox % ErrorLevel
return

SetPlaylistPos:
;Sets Playlist position, note that winamp starts from 0, so you have to -1
;If you want to go to file #10, then specify 9
var++
SendMessage, 0x400, %var%, 121,, ahk_class Winamp v1.x
return

SetVolume:
;Set current volume (0-255)
StringRight, percent, var, 1
if percent = `%
{
StringTrimRight, var, var, 1
var := Round((255*var)/100)
}
SendMessage, 0x400, %var%, 122,, ahk_class Winamp v1.x
return

GetVolume:
;Get current volume (0-255)
SendMessage, 0x400, -666, 122,, ahk_class Winamp v1.x
info := Round((ErrorLevel*100)/255)
MsgBox %ErrorLevel% = %info%`%
return

SetBalance:
;Set balance (Left = -127, Center = 0, Right = 127)
StringRight, percent, var, 1
if percent = `%
{
StringTrimRight, var, var, 1
var := Round((127*var)/100)
}
SendMessage, 0x400, %var%, 123,, ahk_class Winamp v1.x
return

GetPlaylistLength:
;Get the length of the current playlist, in tracks.
SendMessage, 0x400,, 124,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

GetPlaylistPos:
;Get current position in playlist, Winamp starts from 0, so I add 1
SendMessage, 0x400,, 125,, ahk_class Winamp v1.x
info := ErrorLevel+1
MsgBox % info
return

GetInfo:
;Retrieve some info about current track
SendMessage, 0x400, 0, 126,, ahk_class Winamp v1.x
info1 := ErrorLevel
SendMessage, 0x400, 1, 126,, ahk_class Winamp v1.x
info2 := ErrorLevel
SendMessage, 0x400, 2, 126,, ahk_class Winamp v1.x
if ErrorLevel = 1
info3 = Mono
else
info3 = Stereo
MsgBox %info1% kHz - %info2% kbps - %info3%
return

GetEQData:
;Get Equalizer data, but in reversed state. So if you slide an EQ button (say the leftmost one) up, it will be 0, down = 63.
;Value      Meaning
;----------------------------------------------------------
;0-9        The 10 bands of EQ data. 0-63 (+20db - -20db)
;10         The PreAmp value. 0-63 (+20db - -20db)
;11         Enabled. 0 = Disabled, Nonzero = Enabled.
;12         Autoload. 0 = Disabled, Nonzero = Enabled.
EQData=
Loop, 11
{
aa := A_Index-1
SendMessage, 0x400, %aa%, 127,, ahk_class Winamp v1.x
Value := ErrorLevel
Pos := A_Index+1
if Pos = 12
Pos = 1
GuiControl,, EQ%Pos%, %Value%
EQData .= Value "-"
}
StringTrimRight, EQData, EQData, 1
MsgBox % EQData
return

IsEQActivated:
SendMessage, 0x400, 11, 127,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

IsEQAutoloadON:
SendMessage, 0x400, 12, 127,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

SetEQData:
;In order to use this feature, you have to use GetEQData first, then use SetEQData to set the value
Loop, 11
{
pos := A_Index-2
value := EQ%A_Index%
SendMessage, 0x400, %pos%, 127,, ahk_class Winamp v1.x
SendMessage, 0x400, %value%, 128,, ahk_class Winamp v1.x
}
return

AddBookmark:
;[Not implemented yet]
SendMessage, 0x4A,, 131,, ahk_class Winamp v1.x
return

RestartWinamp:
;Restarts Winamp
SendMessage, 0x400, 0, 135,, ahk_class Winamp v1.x
return

IsFullStop:
;[Not implemented yet]
SendMessage, 0x400,, 400,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

SetSkin:
;[Not implemented yet]
;sets the current skin to "skinname". Note that skinname can be the name of a skin, a skin .zip file, with or without path.
;If path isn't specified, the default search path is the winamp skins directory.
SendMessage, 0x400, "Skin.wsz", 200,, ahk_class Winamp v1.x
return

GetSkin:
;[Not implemented yet]
SendMessage, 0x400,, 201,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

ExecPlugin:
;Run specified plugin
SendMessage, 0x400, "%var%", 202,, ahk_class Winamp v1.x
return

GetPlaylistFile:
;[Not implemented yet]
SendMessage, 0x400,, 211,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

GetPlaylistFileW:
;[Not implemented yet]
SendMessage, 0x400,0, 214,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

GetPlaylistTitle:
;[Not implemented yet]
SendMessage, 0x400,, 212,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

IsInetAvailable:
;Will return 1 if the Internet connection is available for Winamp.
SendMessage, 0x400,, 242,, ahk_class Winamp v1.x
if ErrorLevel = 0
MsgBox Internet connection is NOT available
else
MsgBox Internet connection is available
return

GetShuffle:
;Get shuffle state
SendMessage, 0x400,, 250,, ahk_class Winamp v1.x
if ErrorLevel = 1
MsgBox Shuffle is ON
else
MsgBox Shuffle is OFF
return

GetRepeat:
;Get repeat state
SendMessage, 0x400,, 251,, ahk_class Winamp v1.x
if ErrorLevel = 1
MsgBox Repeat is ON
else
MsgBox Repeat is OFF
return

SetShuffle:
;Set shuffle on/off
SendMessage, 0x400, %var%, 252,, ahk_class Winamp v1.x
return

SetRepeat:
;Send shuffle on/off
SendMessage, 0x400, %var%, 253,, ahk_class Winamp v1.x
return

EnableDisableAllWIndows:
;Disable all windows with 0xdeadbeef (only works on classic skin)
;On Modern skin, it will only disable the playlist, user can't click on it.
SendMessage, 0x400, 0, 259,, ahk_class Winamp v1.x
return

GetHWND:
;get HWND of available window
Loop, 4
{
aa := A_index-1
SendMessage, 0x400, %aa%, 260,, ahk_class Winamp v1.x
info%aa% := ErrorLevel
}
MsgBox Equalizer = %info0%`nPlaylist = %info1%`nMini Browser = %info2%`nVideo = %info3%
return

IsWNDVisible:
;Return 1 if visible. Works fine with Classic skin.
Loop, 4
{
aa := A_index-1
SendMessage, 0x400, %aa%, 261,, ahk_class Winamp v1.x
info%aa% := ErrorLevel
}
MsgBox Equalizer = %info0%`nPlaylist = %info1%`nMini Browser = %info2%`nVideo = %info3%
return

openmenu:
/*
** Winamp Pro           20
** General Preferences  0
** File Types           1
** Playlist             23
** Titles               21
** Playback             42
** Station Info         41
** Video                24
** Localization         25
** Skins                40
** Classic Skins        22
** Plugins              30
** Input                31
** Output               32
** Visualization        33
** DSP/Effect           34
** General Purpose      35
*/
SendMessage, 0x400, %var%, 380,, ahk_class Winamp v1.x
return

PopupList:
/*
0 = eject
1 = previous
2 = next
3 = pause
4 = play
5 = stop
*/
SendMessage, 0x400, %var%, 361,, ahk_class Winamp v1.x
return

OpenURLBox:
SendMessage, 0x400,, 360,, ahk_class Winamp v1.x
return

OpenFileBox:
SendMessage, 0x400,, 362,, ahk_class Winamp v1.x
return

OpenDirBox:
SendMessage, 0x400,, 363,, ahk_class Winamp v1.x
return

ShowWND:
/*
0 = EQ
1 = Playlist
2 = MiniBrowser
3 = Video
4 = Main window
*/
SendMessage, 0x400, %var%, 600,, ahk_class Winamp v1.x
return

HideWND:
/*
0 = EQ
1 = Playlist
2 = MiniBrowser
3 = Video
4 = Main window
*/
SendMessage, 0x400, %var%, 601,, ahk_class Winamp v1.x
return

IsDoubleSize:
;Checks if the Winamp is in Doublesize mode
SendMessage, 0x400,, 608,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

GetTimeDisplayMode:
;Get Time Display mode
SendMessage, 0x400,, 610,, ahk_class Winamp v1.x
if ErrorLevel = 1
MsgBox Time display mode = Time remaining
else
MsgBox Time display mode = Time elapsed
return

IsVisRunning:
;Checks if Visualization is running
SendMessage, 0x400,, 613,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

GetManualPlaylistAdvance:
;Checks if manual playlist advance is on/off
SendMessage, 0x400,, 634,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

SetManualPlaylistAdvance:
;Set manual playlist advance to on/off
SendMessage, 0x400,1, 635,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

IsWinshade:
;You have to use GetHWND first, then set the HWND as the param
SendMessage, 0x400,, 638,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

DisableExit:
;You can't press the X button
SendMessage, 0x400,, 647,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

EnableExit:
;You can use the X button again
SendMessage, 0x400,, 648,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

IsExitEnabled:
;Checks if the 'X' exit button is enabled/disabled
SendMessage, 0x400,, 649,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

IsAOT:
;Checks if Winamp is Always On Top
SendMessage, 0x400,, 650,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

IsRecycleBin:
;Checks where the file will go if the user deletes it.
;1 = Deleted file goes to recycle bin, 0 = File is deleted permanently
SendMessage, 0x400,, 651,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

GetSelectedItem:
;Get current position in playlist
SendMessage, 0x400,, 3029,, ahk_class Winamp v1.x
info := ErrorLevel+1
MsgBox % info
return

GetPlayingTitle:
;[Not implemented yet]
SendMessage, 0x400,, 3034,, ahk_class Winamp v1.x
MsgBox % ErrorLevel
return

;-----------------[Basic Operations]---------------------
Previous:
SendMessage, 0x111, 40044,,, ahk_class Winamp v1.x
return
Play:
SendMessage, 0x111, 40045,,, ahk_class Winamp v1.x
return
Pause:
SendMessage, 0x111, 40046,,, ahk_class Winamp v1.x
return
Stop:
SendMessage, 0x111, 40047,,, ahk_class Winamp v1.x
return
Next:
SendMessage, 0x111, 40048,,, ahk_class Winamp v1.x
return
RewInd:
SendMessage, 0x111, 40144,,, ahk_class Winamp v1.x
return
FastForward:
SendMessage, 0x111, 40148,,, ahk_class Winamp v1.x
return
VolumeUp:
SendMessage, 0x111, 40058,,, ahk_class Winamp v1.x
return
VolumeDown:
SendMessage, 0x111, 40059,,, ahk_class Winamp v1.x
return

;-----------------[Special Operations]---------------------
FastForward5s:
SendMessage, 0x111, 40060,,, ahk_class Winamp v1.x
return
Rewind5s:
SendMessage, 0x111, 40061,,, ahk_class Winamp v1.x
return
FadeOutStop:
SendMessage, 0x111, 40147,,, ahk_class Winamp v1.x
return
StopAfterCurrentTrack:
SendMessage, 0x111, 40157,,, ahk_class Winamp v1.x
return
StartVisPlugin:
SendMessage, 0x111, 40192,,, ahk_class Winamp v1.x
return
CloseWinamp:
SendMessage, 0x111, 40001,,, ahk_class Winamp v1.x
return
AddBookmarks:
SendMessage, 0x111, 40321,,, ahk_class Winamp v1.x
return
PlayAudioCD:
SendMessage, 0x111, 40323,,, ahk_class Winamp v1.x
return

;------------------[Playlist Operations]--------------------
PlaylistToggle:
SendMessage, 0x111, 40040,,, ahk_class Winamp v1.x
return
PlaylistGotoTop:
SendMessage, 0x111, 40154,,, ahk_class Winamp v1.x
return
PlaylistGotoBottom:
SendMessage, 0x111, 40158,,, ahk_class Winamp v1.x
return
PlatlistPrevious10Tracks:
SendMessage, 0x111, 40197,,, ahk_class Winamp v1.x
return

;-----------------------[Dialogs]---------------------------
OpenURL:
SendMessage, 0x111, 40155,,, ahk_class Winamp v1.x
return
OpenFile:
SendMessage, 0x111, 40029,,, ahk_class Winamp v1.x
return
PreferencesToggle:
SendMessage, 0x111, 40012,,, ahk_class Winamp v1.x
return
FileInfo:
SendMessage, 0x111, 40188,,, ahk_class Winamp v1.x
return
VisOptions:
SendMessage, 0x111, 40190,,, ahk_class Winamp v1.x
return
VisPlugin:
SendMessage, 0x111, 40191,,, ahk_class Winamp v1.x
return
AboutToggle:
SendMessage, 0x111, 40041,,, ahk_class Winamp v1.x
return
JTT:
SendMessage, 0x111, 40193,,, ahk_class Winamp v1.x
return
JTF:
SendMessage, 0x111, 40194,,, ahk_class Winamp v1.x
return
SelectSkin:
SendMessage, 0x111, 40219,,, ahk_class Winamp v1.x
return
VisPluginCfg:
SendMessage, 0x111, 40221,,, ahk_class Winamp v1.x
return
EQLoadPreset:
SendMessage, 0x111, 40253,,, ahk_class Winamp v1.x
return
EQSaveAs:
SendMessage, 0x111, 40254,,, ahk_class Winamp v1.x
return

;-----------------------[Options]---------------------------
AOTToggle:
SendMessage, 0x111, 40019,,, ahk_class Winamp v1.x
return
DisplayElapsed:
SendMessage, 0x111, 40037,,, ahk_class Winamp v1.x
return
DisplayRemain:
SendMessage, 0x111, 40038,,, ahk_class Winamp v1.x
return
DoublesizeToggle:
SendMessage, 0x111, 40165,,, ahk_class Winamp v1.x
return
EQWindowToggle:
SendMessage, 0x111, 40036,,, ahk_class Winamp v1.x
return
MainWindowToggle:
SendMessage, 0x111, 40258,,, ahk_class Winamp v1.x
return
MinibrowserToggle:
SendMessage, 0x111, 40298,,, ahk_class Winamp v1.x
return
RepeatToggle:
SendMessage, 0x111, 40022,,, ahk_class Winamp v1.x
return
ShuffleToggle:
SendMessage, 0x111, 40023,,, ahk_class Winamp v1.x
return

;-----------------------[Buttons]---------------------------
Button1Shift:
SendMessage, 0x111, 40144,,, ahk_class Winamp v1.x
return
Button2Shift:
SendMessage, 0x111, 40145,,, ahk_class Winamp v1.x
return
Button3Shift:
SendMessage, 0x111, 40146,,, ahk_class Winamp v1.x
return
Button4Shift:
SendMessage, 0x111, 40147,,, ahk_class Winamp v1.x
return
Button5Shift:
SendMessage, 0x111, 40148,,, ahk_class Winamp v1.x
return
Button1Ctrl:
SendMessage, 0x111, 40154,,, ahk_class Winamp v1.x
return
Button2Ctrl:
SendMessage, 0x111, 40155,,, ahk_class Winamp v1.x
return
Button3Ctrl:
SendMessage, 0x111, 40156,,, ahk_class Winamp v1.x
return
Button4Ctrl:
SendMessage, 0x111, 40157,,, ahk_class Winamp v1.x
return
Button5Ctrl:
SendMessage, 0x111, 40158,,, ahk_class Winamp v1.x
return
PrevSong:
;Always goes to the previous song.
SendMessage, 0x111, 40198,,, ahk_class Winamp v1.x
return

ESC::ExitApp

FormatSeconds(NumberOfSeconds)	;Taken from helpfile.
{
    time = 19990101
    time += %NumberOfSeconds%, seconds
    FormatTime, mmss, %time%, mm:ss
    return NumberOfSeconds//3600 ":" mmss
}

UPDATEDSCRIPT:
FileGetAttrib,attribs,%A_ScriptFullPath%
IfInString,attribs,A
{
	FileSetAttrib,-A,%A_ScriptFullPath%
	Reload
}
Return
My first try with SendtMessage, and I choose Winamp to start with, because I always write codes while listening to music...
Well, there's "Not implemented yet" tab on the GUI, I don't know how to make them work for now :cry:
There may be some bugs lying somewhere on the code, I wrote this script in 2 days.

I hope this script can help someone who wants to use SendMessage in Winamp
:wink:

tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008
I don't have winamp, but nice :) and cool window GDI+ border!

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
Thanks tidbit :oops:

tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
Make your own Korean name!
/*
AutoHotkey Version: 1.x
Language:	English
Platform:	Win9x/NT
Author:		tomoe_uehara
Script Function:
	Make your own Korean name
Date of Creation:
	05/12/2011 - 03:51:42
*/

#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%

Gui, Add, MonthCal, x12 y30 w240 h170 vdate gSave
Gui, Add, Text, x22 y10 w230 h20 +Center, Date of birth
Gui, Add, Text, x22 y210 w80 h20 , Surname
Gui, Add, Text, x22 y230 w80 h20 , Middle
Gui, Add, Text, x22 y250 w80 h20 , Name
Gui, Add, Edit, x102 y210 w150 h20 vname1 ReadOnly Center
Gui, Add, Edit, x102 y230 w150 h20 vname2 ReadOnly Center
Gui, Add, Edit, x102 y250 w150 h20 vname3 ReadOnly Center
Gui, Font, Bold
Gui, Add, Edit, x22 y280 w230 h20 vname ReadOnly Center
; Generated using SmartGUI Creator for SciTE
Gui, Show, w265 h315, Make your own Korean name!
return

Save:
Gui, Submit, NoHide
StringMid, a1, date, 4, 1
StringMid, a2, date, 5, 2
StringMid, a3, date, 7, 2
if a1 = 0
a1 = 10	
Loop, 3
{
if A_Index = 1
continue
if a%A_Index% < 10
StringTrimLeft, a%A_Index%, a%A_Index%, 1
}
namelist1 = Kim,Shin,Choi,Song,Kang,Han,Lee,Sung,Jung,Park
namelist2 = Yong,Ji,Je,Hye,Dong,Sang,Ha,Hyo,Soo,Eun,Hyun,Rae
namelist3 = Hwa,Woo,Joon,Hee,Kyo,Kyung,Wook,Jin,Jae,Hoon,Ra,Bin,Sun,Ri,Soo,Rim,Ah,Ae,Neul,Mun,In,Mi,Ki,Sang,Byung,Seok,Gun,Yoo,Sup,Won,Sub
Loop, 3
{
	val := A_Index
	Loop, parse, namelist%val%, `,
	{
	value := a%val%
	if A_Index <> %value%
	continue
	else
	{
	name%val% = %A_LoopField%
	value2 := name%val%
	GuiControl,, name%val%, %value2%
	}
	}
}
name = %name1% %name2% %name3%
GuiControl,, name, %name%
return

Esc::
GuiClose:
ExitApp
Want to know your name in Korean? Just select your date of birth and voila! :D

And also as an example script of simple array usage, at first I wrote the script with lots of IF, but it's exhausting (and I'm lazy to do it all), so I use another way.


tidbit
  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008
Park Ha Ah. Now everyone can figure out my bday :shock: .
Is there any background info on the system used? or is it a Tomoe-made algorithm?

btw: these are Psuedo-Arrays that AHK_Basic can do. not 'real' AHK_L arrays.

rawr. be very afraid
*poke*
. Populate the AutoHotkey city. Pointless but somewhat fun. .


aaronbewza
  • Members
  • 466 posts
  • Last active: Feb 05 2013 08:40 AM
  • Joined: 20 Feb 2011
too cool! My name is "Choi Dong Mi"

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010

Park Ha Ah. Now everyone can figure out my bday :shock:

Not exactly... 1990 July 17th? 1980? 1970? 2000?
... 2010? :shock:

TLM
  • Administrators
  • 3864 posts
  • Last active:
  • Joined: 21 Aug 2006
Can it be used to insult someone being immature?
Like, grow up you little Kim Rae Joon!

Posted Image

don't duplicate, iterate!


tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
I get the idea from here, and yes I haven't try AHK_L yet :oops:
Hi, Park Ah Ha, Choi Dong Mi, and Kim Rae Joon
:lol:

TheGreatSwami Woo
  • Members
  • 237 posts
  • Last active: Jan 22 2012 03:31 PM
  • Joined: 26 May 2011
Good Fun, in honour of this Fun script I am changing my forum name to my new Korean name!
Jung Rae Mun :) maybe everyone who uses this script should do the same for at least a week!

hmm, newcomers to the site would be a bit puzzled as to why it was so popular with Koreans!!

tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
[GDI+] Dim Vision
/*
AutoHotkey Version: 1.x
Language:   English
Platform:   Win9x/NT
Author:     tomoe_uehara
Script Function:
   Protect your eyes from excessive light with Dim Vision!
Date of Creation:
   22/07/12 - 13:00:15
*/
#NoEnv
#SingleInstance, Force
SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
CoordMode, Mouse, Screen
CoordMode, ToolTip, Screen

If !pToken := Gdip_Startup()
{
    MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
    ExitApp
}
OnExit, Exit

File = %A_ScriptDir%\Dim Vision.ini
IfNotExist, %File%
{
IniWrite, 000000, %File%, Tunnel, Color
IniWrite, 80, %File%, Tunnel, Transparency
IniWrite, 80, %File%, Dimmer, Brightness
Reload
}
else
{
IniRead, Color, %File%, Tunnel, Color
IniRead, Trans, %File%, Tunnel, Transparency
IniRead, Bright, %File%, Dimmer, Brightness
}
Width := A_ScreenWidth, Height := A_ScreenHeight
Gui, 1: -Caption +E0x80000 +E0x20 +LastFound +OwnDialogs +Owner +AlwaysOnTop
Gui, 1: Show, NA, GDI
hwnd1 := WinExist()
hbm := CreateDIBSection(Width, Height)
hdc := CreateCompatibleDC()
obm := SelectObject(hdc, hbm)
G := Gdip_GraphicsFromHDC(hdc)
Gdip_SetSmoothingMode(G, 4)
Gui, 2:Add, Tab2, x12 y10 w220 h220 gCheckTab vTab, Tunnel Vision|Screen Dimmer
Gui, 2:Add, Text, x62 y40 w120 h20 Center , Color (RGB Hex format)
Gui, 2:Add, Edit, x62 y60 w120 h20 Center Uppercase Limit6 vColor gSave, %Color%
Gui, 2:Add, Text, x62 y90 w120 h20 Center, Transparency
Gui, 2:Add, DropDownList, x82 y110 w80 h20 r11 vTrans gSave, 0|10|20|30|40|50|60|70|80|90|100
Gui, 2:Add, Button, x62 y170 w120 h40 gCreate, Create Region
Gui, 2:Tab, Screen Dimmer
Gui, 2:Add, Text, x75 y50 w100 h20 Center, Brightness Level
Gui, 2:Add, DropDownList, x75 y70 w100 h20 r11 gSave vBright, 0|10|20|30|40|50|60|70|80|90|100
Gui, 2:Add, Button, x62 y170 w120 h40 gDimmer, Turn off the lights!
Gui, 2:Show,, Dim Vision
GuiControl, 2:ChooseString, Trans, %Trans%
GuiControl, 2:ChooseString, Bright, %Bright%
return

2GuiClose:
GuiClose:
ExitApp

Save:
Gui, Submit, NoHide
IniWrite, %Color%, %File%, Tunnel, Color
IniWrite, %Trans%, %File%, Tunnel, Transparency
IniWrite, %Bright%, %File%, Dimmer, Brightness
return

CheckTab:
Gui, Submit, NoHide
If tab = Screen Dimmer
{
Gdip_GraphicsClear(G)
pBrush := Gdip_BrushCreateSolid(0x00000000)
Gdip_FillRectangle(G, pBrush, 0, 0, width, height)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
}
return

Create:
ToolTip, Press F1 to set the upper-left coordinate, 50, 100
Gui, Submit, NoHide
Trans2 := Round(((100-Trans)/100)*255)
SetFormat, IntegerFast, hex
Trans2 += 0
Trans2 .= ""
SetFormat, IntegerFast, d
Create = 1
Start = 0
WinSet, Bottom,, Dim Vision
return

F1::
if Create = 1
{
	if Start = 1
	{
	ToolTip
	Create = 0
	SetTimer, Check, Off
	Gdip_DeletePen(pPen)
	Gdip_GraphicsClear(G)
	BTx1 := xx1, BTx2 := xx2, BTy1 := 0, BTy2 := yy1
	BRx1 := xx2, BRx2 :=A_ScreenWidth, BRy1 := 0, BRy2 := A_ScreenHeight
	BDx1 := xx1, BDx2 := xx2, BDy1 := yy2, BDy2 := A_ScreenHeight
	BLx1 := 0, BLx2 := xx1, BLy1:= 0, BLy2 := A_ScreenHeight
	BTw := xx2-xx1, BTh := BTy2-BTy1
	BRw := A_ScreenWidth-xx2, BRh := A_ScreenHeight
	BDw := xx2-xx1, BDh := A_ScreenHeight-yy2
	BLw := xx1, BLh := A_ScreenHeight
	Brush = %Trans2%%Color%
	pBrush := Gdip_BrushCreateSolid(Brush)
	Gdip_FillRectangle(G, pBrush, BTx1, BTy1, BTw, BTh)
	Gdip_FillRectangle(G, pBrush, BRx1, BRy1, BRw, BRh)
	Gdip_FillRectangle(G, pBrush, BDx1, BDy1, BDw, BDh)
	Gdip_FillRectangle(G, pBrush, BLx1, BLy1, BLw, BLh)
	UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
	}
	if Start = 0
	{
	Start = 1
	MouseGetPos, xx1, yy1
	SetTimer, Check, 100
	ToolTip, Press F1 again to set the lower-right coordinate, 50, 100
	}
}
return

Check:
Gdip_GraphicsClear(G)
MouseGetPos, xx2, yy2
ww := xx2-xx1
hh := yy2-yy1
pPen := Gdip_CreatePen(0xffFF00FF, 1)
Gdip_DrawRectangle(G, pPen, xx1, yy1, ww, hh)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
return

Dimmer:
Gdip_GraphicsClear(G)
Trans2 := Round(((100-Bright)/100)*255)
SetFormat, IntegerFast, hex
Trans2 += 0
Trans2 .= ""
SetFormat, IntegerFast, d
Brush = %Trans2%000000
pBrush := Gdip_BrushCreateSolid(Brush)
Gdip_FillRectangle(G, pBrush, 0, 0, width, height)
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
return

Esc:: 
Exit:
SelectObject(hdc, obm)
DeleteObject(hbm)
DeleteDC(hdc)
Gdip_DeleteGraphics(G)
Gdip_Shutdown(pToken)
ExitApp
Return
Protect your eyes from excessive light with Dim Vision!
There're 2 types of function.
1. Tunnel Vision = Create a rectangle region and dim the surrounding area.
2. Screen Dimmer = Dim your entire screen.

Note: It needs tic's Gdip lib file to work. There's a small gap that it can't cover, I don't know why.
Enjoy.. :p