Enigma

Compartilhe seus scripts, funções, ferramentas e programas

Moderator: Gio

Post Reply
BeneditoCarneiro
Posts: 13
Joined: 04 Jul 2023, 11:29

Enigma

Post by BeneditoCarneiro » 06 Jul 2023, 12:01

Enigma é como um oráculo onde a pessoa pergunta e recebe uma resposta que tem de ser interpretada porque nada tem a ver com a pergunta.

Code: Select all

/*
Enigma
Copyright 2023 Benedito Carneiro
Save the script as UTF-8 with BOM
*/
#SingleInstance Force
SendMode Input
SetWorkingDir %A_ScriptDir%

bc := Chr(0169) " 2023 Benedito Carneiro"
Gui,1: default
Gui,1: Font, s13 cWhite, Segoe UI
Gui,1: Color, 003366
Gui,1: Add, Text,, Pergunte e decifre o enigma
Gui,1: Add, Button, h30 w80 gEnigma, Enigma
Gui,1: Add, Text,,
Gui,1: Add, Button, h30 w80 gSair, Sair
Gui,1: Add, Text,, %bc%
Gui,1: Show,,Enigma
return

Resizable_GUI(Data,x=950,y=60){
 static EditWindow
 Gui,2:Destroy
 Gui,2:Default
 Gui,2:+Resize
 Gui,2:Font,s14 cBlack q5, Segoe UI
 Gui,2:Color,5CDB95
 Gui,2:Add,Edit,w%x% h%y% -Wrap HScroll hwndEditWindow, %Data%
 Gui,2:Show
 SendInput, {Down}{PgUp}
 return
 2GuiEscape:
 2GuiClose:
 Gui,2:Destroy
 return
 2GuiSize:
 GuiControl,12:Move,%EditWindow%,% "w" A_GuiWidth-30 "h" A_GuiHeight-25
 return
}

SlotMachine(Data,x=950,y=60){
 static EditWindow
 Gui,3:Destroy
 Gui,3:Default
 Gui,3:-SysMenu
 Gui,3:+Resize
 Gui,3:Font,s14 cBlack q5, Segoe UI
 Gui,3:Color,5CDB95
 Gui,3:Add,Edit,w%x% h%y% -Wrap HScroll hwndEditWindow, %Data%
 Gui,3:Show
 i := 1
 while (i < 40)
 {
    SendInput, {Down}
    Sleep, 50
    SoundBeep, 3500, 10
    i += 1
 }
 SendInput, {Esc}
 return

3GuiEscape:
3GuiClose:
Gui,3:Destroy
return

3GuiSize:
GuiControl,3:Move,%EditWindow%,% "w" A_GuiWidth-30 "h" A_GuiHeight-25
return
}

Enigma:
FileRead, todas, enigmas.md
SlotMachine(todas)
Loop, Read, enigmas.md
      quantos = %A_Index%
Random, qual, 1, %quantos%
FileReadLine, story, enigmas.md, qual
Resizable_GUI(story,,150)
return

1GuiEscape:
1GuiClose:
Sair:
Gui,1: destroy
ExitApp

Post Reply

Return to “Scripts e Funções”