Gif Topic is solved
Moderator: Gio
Gif
Tem alguma coisa da biblioteca padrao do ahk pra exibiçao de gif em gui?
Discord: Npc Bugado#9074
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
Re: Gif
Boa tarde Hologram.
Você pode usar um controle ActiveX.
Exemplo: Pra exibir o gif anexo a este post em uma gui do autohotkey, basta você salvá-lo como exemplo_de_gif.gif na mesma pasta do script abaixo e executar o script.
Gif anexo:
Você pode usar um controle ActiveX.
Exemplo: Pra exibir o gif anexo a este post em uma gui do autohotkey, basta você salvá-lo como exemplo_de_gif.gif na mesma pasta do script abaixo e executar o script.
Code: Select all
var := A_ScriptDir . "/exemplo_de_gif.gif" ; ATENCAO !! AJUSTE AQUI O CAMINHO DO ARQUIVO .GIF (GIF ANIMADO).
Gui, Add, ActiveX, x0 y0 w600 h600 vWB, shell explorer
wb.Navigate("about:blank")
html := "<html>`n<title>name</title>`n<body>`n<center>`n<img src=""" var """ >`n</center>`n</body>`n</html>"
wb.document.write(html)
Gui, show, w600 h600 Center
Gif anexo:
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Re: Gif
Na verdade oq ta fazendo o gif aparecer é o html e nao o ahk em si certo?
Acaso for sim, eu posso usar todos elementos de um html comum?
Eu tava querendo deixar o gif em tela cheia, entoa tentei usar assim, mas nao deu bom:
html:
estilo.css:
Acaso for sim, eu posso usar todos elementos de um html comum?
Eu tava querendo deixar o gif em tela cheia, entoa tentei usar assim, mas nao deu bom:
html:
Code: Select all
html := "<html>`n<head>`n<title> Testando </title>`n<meta charset="utf-8" />`n<link rel="stylesheet" type="text/css" href="estilo.css">`n</head><body>`n<img src="Teste.gif" class="largura-cheia" >`n</body>`n</html>"
Code: Select all
.largura-cheia{
width:100%;
height:560px;
}
Discord: Npc Bugado#9074
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
Re: Gif
Bom dia.
Você pode usar todos os elementos de html sim, afinal, é uma das funções do controle ActiveX. Com ele, você pode fazer GUIs tão bem elaboradas quanto qualquer página da web que você já viu.
Mas tem um porém no caso específico que você comentou: como o controle tem dimensões definidas pelo script, creio que colocar no HTML que a página carregue em tela cheia não vai funcionar, pois até onde eu sei, o controle ActiveX tem dimensões bem definidas na GUI do script.
De qualquer forma, você pode criar uma GUI em tela cheia e sem bordas, e depois colocar o controle ActiveX no tamanho da tela inteira.
Você pode usar todos os elementos de html sim, afinal, é uma das funções do controle ActiveX. Com ele, você pode fazer GUIs tão bem elaboradas quanto qualquer página da web que você já viu.
Mas tem um porém no caso específico que você comentou: como o controle tem dimensões definidas pelo script, creio que colocar no HTML que a página carregue em tela cheia não vai funcionar, pois até onde eu sei, o controle ActiveX tem dimensões bem definidas na GUI do script.
De qualquer forma, você pode criar uma GUI em tela cheia e sem bordas, e depois colocar o controle ActiveX no tamanho da tela inteira.
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Re: Gif
assim? n deu bom aqui
Code: Select all
var := A_ScriptDir . "/exemplo_de_gif.gif" ; ATENCAO !! AJUSTE AQUI O CAMINHO DO ARQUIVO .GIF (GIF ANIMADO).
Gui, Add, ActiveX, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% vWB, shell explorer
wb.Navigate("about:blank")
html := "<html>`n<title>name</title>`n<body>`n<img src=""" var """ >`n</body>`n</html>"
wb.document.write(html)
Gui, show, w%A_ScreenWidth% h%A_ScreenHeight%, TEST
Discord: Npc Bugado#9074
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
Re: Gif
Além de expandir a GUI, você deve usar outras opções de janelas pra melhorar o efeito.
ATENÇÃO: A tela fullscreen esconde os controles de borda e a barra de tarefas, então você deve programar uma hotkey ou controles de tela que fechem esta ela (também é possível sair usando alt+tab ou control+shift+esc ou algum outro atalho embutido do windows, mas não deixe seu cliente descobrir isso no desespero ).
Code: Select all
var := A_ScriptDir . "/exemplo_de_gif.gif" ; ATENCAO !! AJUSTE AQUI O CAMINHO DO ARQUIVO .GIF (GIF ANIMADO).
Gui, Add, ActiveX, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% vWB, shell explorer
wb.Navigate("about:blank")
html := "<html>`n<title>name</title>`n<body>`n<img src=""" var """ >`n</body>`n</html>"
wb.document.write(html)
Gui, +LastFound -Border -Caption
Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, TESTE
ATENÇÃO: A tela fullscreen esconde os controles de borda e a barra de tarefas, então você deve programar uma hotkey ou controles de tela que fechem esta ela (também é possível sair usando alt+tab ou control+shift+esc ou algum outro atalho embutido do windows, mas não deixe seu cliente descobrir isso no desespero ).
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Re: Gif
pior que ainda nao consegui expandir, ficou assim:
E se eu colocasse a imagem em uma resouçao grande? Tipo 2K por 1.5K, vai dar problema pra monitores pequenos sera?Discord: Npc Bugado#9074
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
local config = {
delrey = getPlayerCarValue(cid, DELREY),
cigarro = getPlayerCancer(cid, DERBY),
prostituta = getPlayerAIDS(cid, cracuda),
tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end
Re: Gif Topic is solved
Só agora que entendi o que você quer. Pensei que queria expandir a área onde ficará o gif, mas você quer expandir o gif em si.
Bem, você pode usar sim html + CSS pra fazer isso.
Exemplo: No código abaixo, as configurações width e height se referem ao gif e podem ser ajustadas livremente. A sintaxe é número seguido de px e você pode usar as variáveis embutidas A_ScreenWidth e A_ScreenHeight para colocar o total da tela.
Quando você for testar, vale lembrar que o gif exemplo que eu usei já contém uma área branca enorme ao redor da lâmpada, então apesar de a lâmpada aparecer somente no centro da tela, o gif em si está na tela toda sim.
EDIT: removi a informação de que o ajuste do caminho da imagem seria na variável var (eu coloquei o caminho direto do código html neste último exemplo, e ele deve ser ajustado ali mesmo).
Bem, você pode usar sim html + CSS pra fazer isso.
Exemplo: No código abaixo, as configurações width e height se referem ao gif e podem ser ajustadas livremente. A sintaxe é número seguido de px e você pode usar as variáveis embutidas A_ScreenWidth e A_ScreenHeight para colocar o total da tela.
Code: Select all
#SingleInstance, Force
Gui, Add, ActiveX, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% vWB, shell explorer
wb.Navigate("about:blank")
html =
(
<!DOCTYPE html>
<html>
<head>
<style>
img {
width: %A_ScreenWidth%px;
height: %A_ScreenHeight%px;
}
</style>
<body>
<img src="%A_ScriptDir%/exemplo_de_gif.gif">
</body>
</html>
)
wb.document.write(html)
Gui, show, w%A_ScreenWidth% h%A_ScreenHeight% Center
Quando você for testar, vale lembrar que o gif exemplo que eu usei já contém uma área branca enorme ao redor da lâmpada, então apesar de a lâmpada aparecer somente no centro da tela, o gif em si está na tela toda sim.
EDIT: removi a informação de que o ajuste do caminho da imagem seria na variável var (eu coloquei o caminho direto do código html neste último exemplo, e ele deve ser ajustado ali mesmo).
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Archmage Gray - A fantasy shooter game fully coded in AutoHotkey
Return to “Ajuda e Suporte Geral”
Who is online
Users browsing this forum: No registered users and 6 guests