Jump to content

Where sample execution exe display in Corner..??


Recommended Posts

  • Moderators

penggilas2,

I am afraid I do not fully understand what it is you want to do. Could you please explain a little more clearly or post some code showing the problem.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

penggilas2,

I am afraid I do not fully understand what it is you want to do. Could you please explain a little more clearly or post some code showing the problem.

M23

AutoIt :

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <ButtonConstants.au3>

DirCreate(@TempDir & "\sudirosalim")

$tempdir = @TempDir & "\sudirosalim"

FileInstall("sudirosalim.jpg", $tempdir & "\")

SoundPlay(@ScriptDir & "\SoftwarePortable\SudiroSalimFile\Salim-TunhuangKitaro.mp3")

Opt('MustDeclareVars', 1)

Ghoster()

Func Ghoster()

Local $hGui, $OptionsBtn, $OptionsDummy, $OptionsContext, $OptionsCommon, $OptionsFile, $msg

Local $OptionsExit, $HelpBtn, $HelpDummy, $HelpContext, $HelpRes, $HelpResE, $HelpShut, $HelpShutE, $HelpAbout

Local $defaultstatus = " ..oO Hanya Untuk Pribadi dan Untuk Penambahan Oo..", $status, $filemenu, $fileitem, $gui, $background, $font

Local $helpmenu, $helpitem, $PWitem, $infoitem, $exititem, $recentfilesmenu, $Deskitem, $ghostitem, $winima

Local $separator1, $viewmenu, $viewstatusitem, $viewitem, $okbutton, $cancelbutton

Local $statuslabel, $msg, $file

Local $Hirenbutton, $hGui, $n

Local $hGui, $OptionsBtn, $OptionsDummy, $OptionsContext, $OptionsCommon, $OptionsFile, $msg

Local $OptionsExit, $HelpBtn, $HelpDummy, $HelpContext, $HelpWWW, $HelpAbout

Local $contextmenu, $button, $buttoncontext, $buttonitem, $msg

Local $newsubmenu, $textitem, $fileitem, $saveitem, $infoitem, $BS_FLAT

$hgui = GUICreate("WinGhoster Maniax", 270, 270)

GUISetBkColor(0xE0FFFF)

GUICtrlSetColor(-1, 0xff0000) ; Red

$background = GUICtrlCreatePic( $tempdir & "\sudirosalim.jpg", 7, 7, 256, 190)

$filemenu = GUICtrlCreateMenu("&Software")

$winima = GUICtrlCreateMenuItem("WinIma", $filemenu)

$fileitem = GUICtrlCreateMenuItem("UltraISO", $filemenu)

$helpmenu = GUICtrlCreateMenu("Info")

$PWitem = GUICtrlCreateMenuItem("Partition Wizard", $filemenu)

$ghostitem = GUICtrlCreateMenuItem("Ghost32 > GhostFile", $filemenu)

$infoitem = GUICtrlCreateMenuItem("Tentang Script", $helpmenu)

$exititem = GUICtrlCreateMenuItem("PS Info", $filemenu)

$separator1 = GUICtrlCreateMenuItem("", $filemenu, 4) ; create a separator line

$viewitem = GUICtrlCreateMenuItem("SudiroSalim", $viewmenu)

$HelpBtn = GUICtrlCreateButton("&ShutDown Option", 83, 204, 100, 20, $BS_FLAT)

; Create a dummy control and a contextmenu for the help too

$HelpDummy = GUICtrlCreateDummy()

$HelpContext = GUICtrlCreateContextMenu($HelpDummy)

$HelpRes = GUICtrlCreateMenuItem("Restart", $HelpContext)

$HelpResE = GUICtrlCreateMenuItem("EjectCD > Restart", $HelpContext)

$HelpShut = GUICtrlCreateMenuItem("ShutDown", $HelpContext)

$HelpShutE = GUICtrlCreateMenuItem("EjectCD > ShutDown", $HelpContext)

GUICtrlCreateLabel($defaultstatus, 1, 228, 269, 16, BitOR($SS_SIMPLE, $SS_SUNKEN))

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = $fileitem Then ShellExecute (@ScriptDir &"\UltraISO\UltraISOPortable.exe")

If $msg = $ghostitem Then ShellExecute (@ScriptDir &"\ghost\ghost32.exe")

If $msg = $PWitem Then ShellExecute (@ScriptDir &"\partition\partitionwizard.exe")

If $msg = $exititem Then MsgBox (0,".oO PS[Portable Software] Oo.", " Kumpulan Software Portable"& @CRLF & " SudiroSalim")

If $msg = $infoitem Then MsgBox (0,"..oO Ghoster Maniax Oo.."," ..ooOO Ghoster Menu OOoo.."& @CRLF &" Script Ini Jauh dari Kebenaran " & @CRLF & " Mohon Maaf Jika Ada Kesalahan"& @CRLF &" Karena Yang Bikin Untuk Coba-Coba")

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Switch $msg

Case $HelpBtn

ShowMenu($hGui, $msg, $HelpContext)

Case $HelpRes

Run ("notepad.exe")

Case $HelpResE

Run ($tempdir &"\shutdown.exe /eject /u ","",@SW_HIDE)

ProgressOn("Proses Reboot", "Silakan Ambil CD nya..!!!", "0 percent")

For $i = 10 to 100 step 5

sleep(1000)

ProgressSet( $i, $i & " percent")

Next

ProgressSet(200 , "Done", "Reboot")

sleep(1000)

ProgressOff()

Run ($tempdir &"\shutdown.exe /eject /u ","",@SW_HIDE)

Case $HelpShut

Run ($tempdir &"\shutdown.exe /shutdown /u ","",@SW_HIDE)

Case $HelpShutE

Run ($tempdir &"\shutdown.exe /eject /u ","",@SW_HIDE)

ProgressOn("Proses Reboot", "Silakan Ambil CD nya..!!!", "0 percent")

For $i = 10 to 100 step 5

sleep(1000)

ProgressSet( $i, $i & " percent")

Next

ProgressSet(200 , "Done", "Reboot")

sleep(1000)

ProgressOff()

Run ($tempdir &"\shutdown.exe /shutdown /u ","",@SW_HIDE)

EndSwitch

WEnd

GUIDelete()

DirRemove( $tempdir ,1)

EndFunc ;==>Example2

; Show a menu in a given GUI window which belongs to a given GUI ctrl

Func ShowMenu($hWnd, $CtrlID, $nContextID)

Local $arPos, $x, $y

Local $hMenu = GUICtrlGetHandle($nContextID)

If FileExists (@SystemDir &"\shutdown.exe") Then

$arPos = ControlGetPos($hWnd, "", $CtrlID)

$x = $arPos[0]

$y = $arPos[1] + $arPos[3]

ClientToScreen($hWnd, $x, $y)

TrackPopupMenu($hWnd, $hMenu, $x, $y)

Else

MsgBox (0,"Ghoster Info","Hanya Untuk Ghost Windows"& @CRLF &".oO Only For Ghost Windows Oo." )

EndIf

EndFunc ;==>ShowMenu

; Convert the client (GUI) coordinates to screen (desktop) coordinates

Func ClientToScreen($hWnd, ByRef $x, ByRef $y)

Local $stPoint = DllStructCreate("int;int")

DllStructSetData($stPoint, 1, $x)

DllStructSetData($stPoint, 2, $y)

DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $hWnd, "ptr", DllStructGetPtr($stPoint))

$x = DllStructGetData($stPoint, 1)

$y = DllStructGetData($stPoint, 2)

; release Struct not really needed as it is a local

$stPoint = 0

EndFunc ;==>ClientToScreen

; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd)

Func TrackPopupMenu($hWnd, $hMenu, $x, $y)

DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0)

EndFunc ;==>TrackPopupMenu

END AUTOIT...

I want when execute that script will run in top left corner screen.. I has search and run all sample script in AutoIt installer but not found sample script run gui in corner screen.. cause i don`t know common script to call and create gui run in corner screen.

Link to comment
Share on other sites

  • Moderators

penggilas2,

If you want a GUI to appear in a specific place, then you need to add the x & y coordinates to the GUICreate command - like this:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

$hGUI_2 = GUICreate("Middle", 200, 200) ; <<<<<<<<<<<<<<<<<<<<< no x or y coordinates here

GUICtrlCreateLabel("This is in the middle of the screen", 10, 90, 180, 40, $SS_CENTER)

GUISetState()

$hGUI_2 = GUICreate("Corner", 200, 200, 0, 0)  ; <<<<<<<<<<<<<<< x & y coordinates added here

GUICtrlCreateLabel("This is in the Top Left corner of the screen", 10, 90, 180, 40, $SS_CENTER)

GUISetState()

$hGUI_2 = GUICreate("Corner", 200, 200, @DesktopWidth - 200 , @DesktopHeight - 250)  ; <<<<<<<<<<<<<<< add x & y coordinates added here

GUICtrlCreateLabel("This is in the Bottom Right corner of the screen", 10, 90, 180, 40, $SS_CENTER)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Is that what you were looking for? :)

M23

P.S. If you use the correct Code tags it makes it much easier to read. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). ;)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

penggilas2,

If you want a GUI to appear in a specific place, then you need to add the x & y coordinates to the GUICreate command - like this:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

$hGUI_2 = GUICreate("Middle", 200, 200) ; <<<<<<<<<<<<<<<<<<<<< no x or y coordinates here

GUICtrlCreateLabel("This is in the middle of the screen", 10, 90, 180, 40, $SS_CENTER)

GUISetState()

$hGUI_2 = GUICreate("Corner", 200, 200, 0, 0)  ; <<<<<<<<<<<<<<< x & y coordinates added here

GUICtrlCreateLabel("This is in the Top Left corner of the screen", 10, 90, 180, 40, $SS_CENTER)

GUISetState()

$hGUI_2 = GUICreate("Corner", 200, 200, @DesktopWidth - 200 , @DesktopHeight - 250)  ; <<<<<<<<<<<<<<< add x & y coordinates added here

GUICtrlCreateLabel("This is in the Bottom Right corner of the screen", 10, 90, 180, 40, $SS_CENTER)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Is that what you were looking for? :)

M23

P.S. If you use the correct Code tags it makes it much easier to read. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here). ;)

U are right.. that's what I was looking for and I want.. Thank M23.. U always give me the solution..

Link to comment
Share on other sites

  • Moderators

penggilas2,

Glad I could help. :)

One last thing - when you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...