관리 메뉴

ㄴrㅎnㅂrㄹrㄱi

브라우저 본문

AUTOHOTKEY/스크립트

브라우저

님투 2013. 1. 17. 17:34
반응형

http://www.autohotkey.com/board/topic/88516-help-galaxy-online-loader-enter-key-not-working/?hl=shell.explorer



;-----------------------------------------
; 오토핫키 파일
;-----------------------------------------

;~ ---------------------------------------------------------------------
;~ Galaxy Online Loader v.1
;~ AHK_L ver. 1.1.09.01 or later
;~ by M4yh3m
;~ ----------------------------------------------------------------------
 
#NoEnv  
#Warn
SendMode Input  
SetWorkingDir %A_ScriptDir%  
#SingleInstance force
SetTitleMatchMode, 2
SetTitleMatchMode, Slow
 
;~ Check if your Screen resolutions is less than 1024 x 768
; Verificamos que la resolucion sea adecuada para el juego si no le advertimos al usuario que no lo podra ver correctamente.
if (A_ScreenWidth < 1024 or A_ScreenHeight < 768)
MsgBox La Resolucion de su Pantalla no cumple los requisitos del juego `nSu resolucion debe ser minimo 1024px de Ancho y 768px de Alto `nEsto significa que no podra ver el juego Correctamente.
 
 
;~ Variables
URL   = www.google.co.kr
vSize := (A_ScreenWidth - 1024)/2 
rs :=
rs2 := 
User := "YOUR FACEBOOK USER" ;Change this in order to login
Pass := "YOUR FACEBOOK PASS" ;Change this in order to login
PopUp := "174539782593294"
 
 
;~ Creates the Gui and remove the buttons minimize and maximize
;~ Elimina los botones de Maximizar y Minimizar y NO permite Cambiar el tamaño de la forma
Gui , +HWNDATLWinHWND -Resize -MinimizeBox -MaximizeBox  
 
;~ Add the Activex control
;~ Especifica Que abriras un control Activex y sera de IE explorer.
Gui, Add, ActiveX, % "x-" vSize " y0 w" (A_ScreenWidth+13) " h828 vWB", Shell.Explorer    
 
WB.silent := true
 
IOleInPlaceActiveObject_Interface:="{00000117-0000-0000-C000-000000000046}"
 
pipa := ComObjQuery(WB, IOleInPlaceActiveObject_Interface)
 
   OnMessage(WM_KEYDOWN:=0x0100, "WM_KEYDOWN")
 
   OnMessage(WM_KEYUP:=0x0101, "WM_KEYDOWN")
   
   
;~ Go to Website
;~ Aqui abrimos la Pagina de igg.. que esta almacenada en la variable URL
WB.Navigate(URL)
 
;~ Shows the Gui and resize it to the Game Size
;~ Definimos el tamaño de la ventana que se nos mostrara ademas ademas su titulo.. y hacemos la ventana Visible
Gui Show, % "x" vSize " y0 w1024 h650", Go2Matic
 
;~ Wait to load the Site
;~ Cargamos la Pagina y Esperamos a que termne de cargar
While( !Instr( rs, 4 ) || StrLen( rs )<7000 )
    rs .= WB.ReadyState
 
;~ Get the game and center the Gui to it
;~ Le decimos que el body de la pagina HTML sera el elemento GAME de la pagina de IGG.. de esta manera se centra el juego.
WB.document.getElementsByTagName("body")[0].innerHTML := WB.document.getElementById("game").innerHTML
 
;~ Click the play button
;~ Presionamos Click en el boton jugar...
WB.document.getElementsByTagName("A")[1].click()
 
 
WinWait  % PopUP
 
FullName := "174539782593294"
 
IfWinExist % Fullname
{
For IE in ComObjCreate("Shell.Application").Windows ; for each open window
If InStr(IE.FullName, "iexplore.exe") ; check if it's an ie window
break ; keep that window's handle
}
 
 
While( !Instr( rs2, 4 ) || StrLen( rs2 )<7000 )
    rs2 .= IE.ReadyState
 
WinActivate % PopUp
 
IE.document.All.email.Value := User
IE.document.All.pass.Value := Pass
IE.document.getElementsByTagName("INPUT")[17].Click()
 
While( !Instr( rs, 4 ) || StrLen( rs )<7000 )
    rs .= WB.ReadyState
 
 
#IfWinActive , Go2Matic
{
;~ WheelDown::return
;~ WheelUp::return
^Q::ExitApp
}
 
WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
   global pipa
   static keys:={9:"tab", 13:"enter", 46:"delete", 38:"up", 40:"down"}
   if keys.HasKey(wParam)
   {
      WinGetClass, ClassName, ahk_id %hWnd%
 if  (ClassName = "MacromediaFlashPlayerActiveX")
      {
         ; Build MSG Structure
         VarSetCapacity(Msg, 7*A_PtrSize)
         for i,val in [hWnd, nMsg, wParam, lParam, A_EventInfo, A_GuiX, A_GuiY]
            NumPut(val, Msg, (i-1)*A_PtrSize)
        
; Call Translate Accelerator Method
 
TranslateAccelerator := NumGet(NumGet(1*pipa)+5*A_PtrSize)
 
         DllCall(TranslateAccelerator, "Ptr",pipa, "Ptr",&Msg)
 
         return, 0
 
      }
 
   }
 
}
 
;~ Cuando se cierra la ventana se sale de la aplicacion
GuiEscape:
GuiClose:
Gui, Destroy
ObjRelease(pipa)
ExitApp  


반응형

'AUTOHOTKEY > 스크립트' 카테고리의 다른 글

GroupBox2()  (0) 2013.01.15
ELP Extended-length path library 1.1  (0) 2013.01.15
돋보기 기능 만들기  (0) 2011.05.12
SendMessage scripts for ListBox  (0) 2010.03.23
Custom GUI Controls & GUI related  (0) 2010.02.22
Comments