SKAN wrote:
Remove AltSubmit in the following line..
SKAN very good !
And Now i know many thing...
(the Simple signification 0x1 , and more...)
At this time, i have that:
Code:
#noenv
SetTimer ,UPDATEDSCRIPT,1000
; ===========================================================
Menu, Tray, Click, 1
Menu, Tray, Add,
Menu, Tray, Add, Show_Hide
Menu, Tray, Add, info
Menu, Tray, Standard
Menu, Tray, Default , Show_Hide
; ===========================================================
CONSOLE:
Gui, Add, ComboBox,x-1 y-1 w400 Simple vSelected gclick , ;; AltSubmit for> number line ;; & Simple=0x1 ;;
;; ? And for adding graphical resize ? at the right-bottom
gui -caption ; No Tile-Bar
CoordMode, Mouse , Screen ; coord sreen
MouseGetPos,x,y ; coord souris
gui show,x%x% y%y% w400 h300, NOM_du_PROGRAM ; SHOW gui under Mouse
SplitPath, A_AhkPath,, A_AhkDir
le_Fichier_de_Lecture= %A_AhkDir%\Extras\Editors\Syntax\Commands.txt
gosub CHARGER_le_Fichier_de_Lecture ; Charger le Fichier Cmd de départ
ControlFocus, Selected, NOM_du_PROGRAM ; Set focus to the ComboBox
Return
; =========================================================== //
; =========================================================== //
; =========================================================== // Show_Hide the gui
Show_Hide:
Gui , +LastFoundExist
IfWinExist ,
{
WinGetPos , SCT_X, , , , NOM_du_PROGRAM
If SCT_X=
{ Gui , Show
WinActivate ,NOM_du_PROGRAM
}
Else
Gui Hide
}
else
Gosub CONSOLE
Return
; =========================================================== //
; =========================================================== HOTKEY gui Show_Hide
#p:: goto Show_Hide
; ~#p:: goto Show_Hide
info:
MsgBox , 4160 , , windows+P => Show_Hide`nOne Left-Click to See the Line`nDble Left-Click => copy to clipboard`nRight-Click to Hide the Gui.
Return
; ===========================================================//
; =========================================================== ; IfWinActive (ENTER)
#IfWinActive NOM_du_PROGRAM
enter::
GuiControlGet , Selected
; ??? BUT HOW-To just save the "selected" of the vSelected ???
clipboard := Selected
gui hide
Return
#IfWinActive
; ===========================================================//
; =========================================================== ; click ; Just for a Double/Clique
click:
if A_GuiEvent = Normal
return
GuiControlGet , Selected
clipboard := Selected
gui hide
Return
; ===========================================================//
; =========================================================== ; GuiSize
GuiSize:
if ErrorLevel = 1
return
WinGetPos , ,, large, haut, NOM_du_PROGRAM
; haut:=haut-22 ; with my titlbar
; large:=large-5 ;
GuiControl , Move, Selected, W%large% H%haut%
Return
; ===========================================================//
; =========================================================== ; GuiDropFiles
; ²BUT The AUTOcomplet dont't run after the drop !! ?why¿
;
GuiDropFiles:
Loop, parse, A_GuiEvent, `n
SelectedFileName = %A_LoopField%
FileGetAttrib ,attribs, %SelectedFileName%
IfInString , attribs, D ; si dossier/Directory
Return ; si dossier!> return
GuiControl , , Selected, | ; remize à zero
le_Fichier_de_Lecture= %SelectedFileName% ; Définir le Fichier de Cmd
Gosub CHARGER_le_Fichier_de_Lecture ; charger le Fichier de Cmd
return
; ===========================================================//
; =========================================================== ; Guiclose
GuiContextMenu: ; Launched in response to a RIGHT-CLICK or press of the Apps key.
Guiclose:
GuiEscape:
gui hide
return
; ===========================================================//
; =========================================================== ; CHARGER_le_Fichier_de_Lecture
CHARGER_le_Fichier_de_Lecture:
FileRead , Commands, %le_Fichier_de_Lecture%
StringReplace , Commands, Commands, |, \, All
StringReplace , Commands, Commands, `r, , All
StringReplace , Commands, Commands, `n,| , All
GuiControl , , Selected, %Commands%
return
; =========================================================== //
; =========================================================== ; the so good UPDATEDSCRIPT
UPDATEDSCRIPT:
FileGetAttrib,attribs,%A_ScriptFullPath%
IfInString,attribs,A
{
FileSetAttrib,-A,%A_ScriptFullPath%
posX = %A_CaretX%
posY = %A_CaretY%
ToolTip, Updated script> %A_ScriptName%, %posX%, %posY%
Sleep,500
Reload
}
Return
; =========================================================== //
; END.soggos 28 Mai 2009
little img:
