eletrônica automotiva em suas mãos
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

teste :lol!:

Ir para baixo

teste  :lol!:  Empty teste :lol!:

Mensagem por Admin Sáb Jan 21, 2017 6:10 pm

TESTE

Admin
Admin

Mensagens : 4
Data de inscrição : 18/01/2017

https://reparo-de-central.directorioforuns.com

Ir para o topo Ir para baixo

teste  :lol!:  Empty Re: teste :lol!:

Mensagem por Admin Sáb Jan 21, 2017 6:14 pm

TESTE 2

Código:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Red.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs
   [CWAutCompFileInfo]
   Company=ec-games
   Copyright=
   Description=arcade
   Version=1.0.0.0
   ProductName=
   ProductVersion=1.0.0.0
#ce
#include <File.au3>
#include <Misc.au3>
#include <sound.au3>
#include <string.au3>
#include <_video.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("Sendkeydowndelay", 250)
;........................................... Variáveis  e janelas ................................................

If Not FileExists("rom_list.ini") Then IniWrite("rom_list.ini", "roms","rom- 1","")
Local $nroms = _FileListToArray("Mame/roms", "*.zip")
Local $video, $wdt = @DesktopWidth, $hdt = @DesktopHeight, $mod, $coin, $play,$time=50,$nwlist = 1,$progrss,$rom

$Form = GUICreate("")
       GUISetState(@SW_MAXIMIZE)
$Form = GUICreate("", $wdt, $hdt, BitAND($WS_SIZEBOX, $WS_SYSMENU))
      GUISetState()
$pic  =   GUICtrlCreatePic("img/snap.bmp", 0, 0, $wdt, $hdt)




$Disp = GUICtrlCreateLabel("", Int($wdt / 2.50), Int($hdt / 10.5), Int($wdt/1.6), Int($hdt/22), 1)      ;muda posição do nome do jogo





      GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
      GUICtrlSetColor($Disp, 0xffff00)                                  ;cor do nome do jogo
   GUICtrlSetFont(-1, $hdt/45.5, 800,800,"Atari Font Full Version")



$img  =   GUICtrlCreatePic("img/snap.bmp",-$wdt, -$hdt, Int($wdt / 1.99), Int($hdt / 2.4))





      GUICtrlSetState($img, 128)






$Ficha= GUICtrlCreateLabel("Créditos 00", Int($wdt / 1.50), Int($hdt / 1.30), Int($wdt/5),Int($hdt/20), $SS_CENTER)
      GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
      GUICtrlSetFont(-1, 35, 800)
      GUICtrlSetColor(-1, 0xefffff)
$lista= GUICtrlCreateList("", - 500, - 100, $wdt / 3.2, $hdt /4.4 , $WS_BORDER, BitOR(0x0002,0x00000200,0x0008))

      GUICtrlSetFont(-1, 18,800)
      GUICtrlSetState(-1, $GUI_FOCUS)
      GUISetState(@SW_SHOW)
      ProgressOn("Aguarde","Atualizando roms", "Aguarde alguns minutos", -1, $hdt/1.2,1)
      ProgressSet(0, "      0%")

;............................... Leitura da xml e geração de lista de jogos e nomes ..................................

$datarom = FileRead( FileOpen("mame/rom_data.xml"))
$nomerom = _StringBetween($datarom, '<game name="', '">')
$clonrom = _StringBetween($datarom, '<description>', '</')
$ngenero = _StringBetween($datarom, '<genre>', '</genre>')

HotKeySet("{0}", "Coin") ; Recebe ficha
_SoundPlay("sons/intro.wav"); introdução

; ............. Verifica pasta roms e seleciona roms e bios gerando menu..............................................
Local $r_list
For $i = 1 To $nroms[0]
   If IniRead("rom_list.ini", "roms", "rom- " & $i, " ") Then $r_list += 1
Next
If IniRead("rom_list.ini", "roms", "rom- " & $nroms[0] + 1, " ") Then $r_list += 1

If $nroms[0] <> $r_list Then
   FileDelete("rom_list.ini")
   Local $ci=1
   While $nwlist



      $nroms  = _FileListToArray("Mame/roms", "*.zip")        ;le a pasta roms




      $nwlist = 0
      Local $nomeJogo[$nroms[0]+1]
      For $i = $ci To $nroms[0]
         $nroms[$i]  = StringReplace($nroms[$i], ".zip", "") ; retira o .zip
         For $j = 0 To UBound($nomerom)-1




            If $nroms[$i] = $nomerom[$j] And $ngenero[$j] <> "BIOS" Then  ;verifica se a rom está na xml e se é uma bios





               $part = _StringBetween($clonrom[$j], "(", ")")          ; procura texto entre parenteses
               If UBound($part) Then $clonrom[$j] = StringReplace($clonrom[$j], "(" & $part[0] & ")", ""); retira texto entre parenteses
               $nomeJogo[$i] = $clonrom[$j]                                                              ;gera lista com nome dos jogos
               GUICtrlSetData($lista, StringUpper($clonrom[$j]))          ;cria item da lista com um nome de jogo da lista
               GUICtrlSetBkColor($lista, 0x0035b1)                ; cor azul

               GUICtrlSetColor($lista, 0xcccccc)
               IniWrite("rom_list.ini", "roms","rom- " & $i, $clonrom[$j])
               $nwlist = 1
               If $i >= $progrss Then $progrss += 1                                       ;$prgrss = Int(($nroms[0]*100)/$nroms[0])
               ProgressSet( Int($progrss/$nroms[0]*100), Int($progrss/$nroms[0]*100) &"%" )
               $ci = $i
               $j = UBound($nomerom)-1                      ; se encontrado sai do for
            EndIf
         Next
         If Not $nwlist Then                  ;Se não encontrado
            FileMove("Mame/roms/" & $nroms[$i] & ".zip","Mame/bios/"& $nroms[$i] & ".zip", 1); move a rom mãe ou a bios para a pasta bios
            $i = $nroms[0]
            $nwlist = 1
         Else
            $nwlist = 0
         EndIf
      Next
   WEnd
Else
   Local $nomeJogo[$nroms[0]+1]
   For $i = 1 To $nroms[0]
      $nroms[$i]  = StringReplace($nroms[$i], ".zip", "") ; retira o .zip
      $nomeJogo[$i] = IniRead("rom_list.ini", "roms", "rom- " & $i, " ")                                                            ;gera lista com nome dos jogos
      GUICtrlSetData($lista, StringUpper($nomeJogo[$i]))          ;cria item da lista com um nome de jogo da lista






       GUICtrlSetBkColor($lista , 0x000000)          ; cor verde 0x396500







        ;GUICtrlSetBkColor($lista, $GUI_BKCOLOR_TRANSPARENT)






      GUICtrlSetColor($lista, 0xf0cccc)              ;cor cinza claro p/ texto










      IniWrite("rom_list.ini", "roms","rom- " & $i, $nomeJogo[$i])
      If $i >= $progrss Then $progrss += 1                                                         ;$prgrss = Int(($nroms[0]*100)/$nroms[0])
      ProgressSet( Int($progrss/$nroms[0]*100), Int($progrss/$nroms[0]*100) &"%", "Adicionando roms")
      $j = UBound($nomerom)-1                      ; se encontrado sai do for
   Next
EndIf
ProgressSet(100 , "Feito", "Concluído")
sleep(500)
ProgressOff()

; ................................... Exibe texto com o número de jogos disponíveis .....................................

$Jogos =GUICtrlCreateLabel($nroms[0] & " JOGOS", Int($wdt / 6.50), ($hdt / 1.07), $wdt/6, $hdt/14, 1)
      GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
      GUICtrlSetColor(-1, 0xefffff)
      GUICtrlSetFont(-1, 20, 800,1,"AllStar")
      GUICtrlSetPos($img, Int($wdt / 1.89), Int($hdt/5), Int($wdt - $wdt / 1.60), Int($hdt / 2.45))          ;snap
      GUICtrlSetPos($lista, Int($wdt / 24), Int($hdt/5.05), Int($wdt - $wdt / 1.61), Int($hdt / 1.40))
      GUICtrlSetImage($pic, "img/pandora.bmp")
      Send("{down}")

;................................................ Envia Créditos .........................................................

Func Coin()
   If $play Then
      Send("{5}")
   Else
      $coin += 1
      SoundPlay("sons/coin.wav")
      If $coin >  9 Then GUICtrlSetData($Ficha, "Créditos "  & $coin)
      If $coin < 10 Then GUICtrlSetData($Ficha, "Créditos 0" & $coin)
   EndIf
EndFunc
;............................................  Corpo do Programa ..........................................................

While 1
   If Not $play Then
      $time -= 1
      If $time < 10  And Not $coin And $nroms[0] < 80 Then
         $time = Random(50, 240, 1)
         $rnd = Random(1, $nroms[0], 1)
         _VideoClose($video)
















         GUICtrlSetImage($img, "img/" & Random(0,95,1) & ".jpg")
         GUICtrlSetPos($img,  Int($wdt / 1.97), Int($hdt/4.8), Int($wdt / 2.27), Int($hdt / 2.25))

















         For $i = 1 To $nroms[0]
            If GUICtrlRead($lista) = $nomeJogo[$i] Then
               GUICtrlSetState($lista, $GUI_FOCUS)

               While $rnd < $i
                  Send("{up}")
                  $i-=1
               WEnd
               While $rnd > $i
                  Send("{down}")
                  $i+=1
               WEnd
               $i = $nroms[0]
            EndIf
         Next
      EndIf
      If Not(_IsPressed(25) Or _IsPressed(26) Or _IsPressed(27) Or _IsPressed(28)) Then
         If $mod <> GUICtrlRead($lista)  Then
            SoundPlay("sons/Slc.wav") ;Som para selecionar jogo  "opcional"
            For $i = 1 To $nroms[0]



               If GUICtrlRead($lista) = $nomeJogo[$i] Then
                  $rom = $nroms[$i]
                  $i = $nroms[0]
                  $mod = GUICtrlRead($lista)
                  movie()
               EndIf
            Next
         EndIf
      EndIf







;Global $video1




        If _IsPressed("0D") and $coin >= 1 Then  ;Enter
      SoundPlay("sons/advcarregando.wav")
      ;If _IsPressed("0D") And $mod = GUICtrlRead($lista) Then  ;Enter free play
         _VideoClose($video)

            ShellExecute("mame.exe", $rom, "MAME")
         ShellExecute("brscript2.exe")
          ProcessWait("mame.exe")

         Sleep(7000)
         ;If $rom = "kof98" Or $rom = "kof97" Or $rom = "kf2k2mp2" Then Send("{F7}{9}")  ; Load State "opcional"
         $play = 1
      EndIf
   ElseIf  Not ProcessExists("mame.exe") And $play Then
      WinWaitActive("[class:AutoIt v3 GUI]")
      movie()
      $play = 0
      $mod = 1
   ElseIf ProcessExists("mame.exe") And $coin Then
      While $coin
         Send("{5}")
         SoundPlay("sons/coin.wav")
         $coin -= 1
         Sleep(500)
      WEnd
      GUICtrlSetData($Ficha, "Créditos 00")
   EndIf
   $tpress = 40
   While _IsPressed(20) And _IsPressed("0D") And $tpress ;Espaço e Enter ( fechar emulador )
      $tpress -= 1
      Sleep(90)
   WEnd
   If Not $tpress And ProcessExists("mame.exe") Then
      SoundPlay("sons/menu.wav")
      SoundPlay("sons/fechaemu.wav")
      Send("{p}")
      Sleep(3000)
      Send("{esc}")
      WinWaitActive("[class:AutoIt v3 GUI]")
   EndIf



   ;If _IsPressed("4c") And Not $play Then ; sai do emulador com a tecla L
      If _IsPressed("1B") And Not $play Then ; sai do emulador com a tecla ESC




      $sair = 0
      _VideoClose($video)
      While $sair < 7
         $sair = MsgBox(36, "", "Fechar Auto-Mame")
         If $sair = 6 Then Exit
      WEnd
      movie()
   EndIf
   Sleep(160)
WEnd

;........................................ Vídeo Intro ...................................................

Func movie()
   GUICtrlSetData($Disp, GUICtrlRead($lista))
   $time = 90
   _VideoClose($video)
   Sleep(70)
   $videoDir = "mame/videos/" & $rom & ".avi"
   $video = _VideoOpen($videoDir,$Form)
   $videoPlay = _VideoPlay($video, Int($wdt / 1.97), Int($hdt/4.8), Int($wdt / 2.27), Int($hdt / 2.25))
   If Not $videoPlay Then
      $video = _VideoOpen("mame/videos/mame.avi",$Form)
      _VideoPlay($video, Int($wdt / 1.97), Int($hdt/4.8), Int($wdt / 2.27), Int($hdt / 2.25))
   EndIf
EndFunc



OI OI OI:

Admin
Admin

Mensagens : 4
Data de inscrição : 18/01/2017

https://reparo-de-central.directorioforuns.com

Ir para o topo Ir para baixo

teste  :lol!:  Empty Re: teste :lol!:

Mensagem por Admin Sáb Jan 21, 2017 6:15 pm

affraid affraid affraid affraid

Admin
Admin

Mensagens : 4
Data de inscrição : 18/01/2017

https://reparo-de-central.directorioforuns.com

Ir para o topo Ir para baixo

teste  :lol!:  Empty Re: teste :lol!:

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos