Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
#include <AVIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form1", 405, 294, 302, 218)
$Pic1 = GUICtrlCreatePic("", 8, 0, 225, 145)
$Avi1 = GUICtrlCreateAvi("No File", -1, 88, 152, 273, 129)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $ani1, $buttonstart, $buttonstop, $msg
GUICreate("My GUI Animation", 300, 200)
$ani1 = GUICtrlCreateAvi(@SystemDir & "\shell32.dll", 165, 50, 10)
$buttonstart = GUICtrlCreateButton("start", 50, 150, 70, 22)
$buttonstop = GUICtrlCreateButton("stop", 150, 150, 70, 22)
GUISetState()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $buttonstart
GUICtrlSetState($ani1, 1)
Case $msg = $buttonstop
GUICtrlSetState($ani1, 0)
EndSelect
WEnd
EndFunc ;==>Example
Non volevo dire cosi io voglio uno script che quando clicco un bottone tipo apri image la aprePer farlo devi creare una gui e mettere l'oggetto "picture" o "avi" ecco il codice.
Codice:#include <AVIConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form2 = GUICreate("Form1", 405, 294, 302, 218) $Pic1 = GUICtrlCreatePic("", 8, 0, 225, 145) $Avi1 = GUICtrlCreateAvi("No File", -1, 88, 152, 273, 129) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
Questo è l'esempio funzionante dell' help (per i video)
Codice:#include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $ani1, $buttonstart, $buttonstop, $msg GUICreate("My GUI Animation", 300, 200) $ani1 = GUICtrlCreateAvi(@SystemDir & "\shell32.dll", 165, 50, 10) $buttonstart = GUICtrlCreateButton("start", 50, 150, 70, 22) $buttonstop = GUICtrlCreateButton("stop", 150, 150, 70, 22) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $buttonstart GUICtrlSetState($ani1, 1) Case $msg = $buttonstop GUICtrlSetState($ani1, 0) EndSelect WEnd EndFunc ;==>Example
RUNDOS("Start [COLOR=#ff0000]percorsoimmagine[/COLOR].[COLOR=#ff0000]estensione[/COLOR]")
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $dir
$Form2 = GUICreate("Form1", 405, 294, 302, 218)
$Button1 = GUICtrlCreateButton("Apri immagine", 8, 80, 385, 65)
$Input1 = GUICtrlCreateInput("Inserisci percorso immagine", 16, 48, 377, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$dir = GuiCtrlRead($input1)
open($dir)
EndSwitch
WEnd
Func open($directory)
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form1", 405, 294, 363, 179)
$Pic1 = GUICtrlCreatePic($directory, 0, 0, 401, 289)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
$Form1 = GUICreate("Apri", 217, 118, 192, 124)
$Button1 = GUICtrlCreateButton("Clicca Qui per aprire", 8, 48, 187, 49, 0)
$Label1 = GUICtrlCreateLabel("Script per aprire un immagine o video", 8, 16, 178, 17)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
_apri()
EndSwitch
WEnd
Func _Apri()
$file0 = FileOpenDialog("Scegli il file da aprire", @DesktopDir, "Imagini (*.png; *.bmp; *.gif; *.jpg; *.jpeg)|Video (*.avi; *.mpeg; *.wmv; *.mp4; *.3gp; *.flv; *.mkv)", 1 + 4 )
$file = StringReplace( $file0, " ", '" "')
_RunDos("start " & $file)
EndFunc
Non intendevo questo perchè io voglio che premono un bottone e si apre file avi img ecc ma non con il processoSpero che ho capito la tua riciesta...e ti posto il mio script:
Spero che vada bene, se coppi solo parte del codice per un tuo programma non dimenticare di incrutere il file Process.au3, (#include <Process.au3>)PHP:#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Process.au3> $Form1 = GUICreate("Apri", 217, 118, 192, 124) $Button1 = GUICtrlCreateButton("Clicca Qui per aprire", 8, 48, 187, 49, 0) $Label1 = GUICtrlCreateLabel("Script per aprire un immagine o video", 8, 16, 178, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 _apri() EndSwitch WEnd Func _Apri() $file0 = FileOpenDialog("Scegli il file da aprire", @DesktopDir, "Imagini (*.png; *.bmp; *.gif; *.jpg; *.jpeg)|Video (*.avi; *.mpeg; *.wmv; *.mp4; *.3gp; *.flv; *.mkv)", 1 + 4 ) $file = StringReplace( $file0, " ", '" "') _RunDos("start " & $file) EndFunc
Spero di esserti stato utile
hai provato con runNon intendevo questo perchè io voglio che premono un bottone e si apre file avi img ecc ma non con il processo
io credo che lui voglia una cosa come la cosa di windows 7 che apre le img,e che sia in una form credo per hack xD@ AlexPowa™:
in che senso con il processo?
Quello che ho fatto non va?
dopo aver provato dove che pensi che non è qello che vuoi?
@ XxMerlinoxX:
il funzione run avvia solo i eseguibili e per i formati video non è possibile...
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form1", 405, 294, 302, 218)
$Button1 = GUICtrlCreateButton("Apri immagine", 8, 80, 385, 65)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
open()
EndSwitch
WEnd
Func open()
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form1", 405, 294, 363, 179)
$Pic1 = GUICtrlCreatePic([FONT=arial black]percorso[/FONT], 0, 0, 401, 289)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Questo e quello che intendevo ma non va D:Devi metterci tu il percorso?
Codice:#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form2 = GUICreate("Form1", 405, 294, 302, 218) $Button1 = GUICtrlCreateButton("Apri immagine", 8, 80, 385, 65) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 open() EndSwitch WEnd Func open() #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form2 = GUICreate("Form1", 405, 294, 363, 179) $Pic1 = GUICtrlCreatePic([FONT=arial black]percorso[/FONT], 0, 0, 401, 289) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
Così non ti chiede niente...
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form1", 405, 294, 302, 218)
$Button1 = GUICtrlCreateButton("Apri immagine", 8, 80, 385, 65)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
open()
EndSwitch
WEnd
Func open()
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form2 = GUICreate("Form1", 405, 294, 363, 179)
$Pic1 = GUICtrlCreatePic("[FONT=arial black]percorso[/FONT]", 0, 0, 401, 289)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndFunc
ou stai carmo o trovato 300 addres ma questa cosa la voglio sapere tnt x nn si sa maiquesto significa ke non sai fa nnt xD (alex)