Jump to content

Another Question


Recommended Posts

Hi guys got a little problem here... :(

This is my code:.

CODE

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1) ; Change to OnEvent mode

Global $prevString

$quitHotkey = "^q"

HotKeySet ( $quitHotkey ,"CLOSEClicked")

$GUIStyle = $WS_BORDER + $WS_POPUP

$GUIStyleEx = $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST

$mainWindowPosX = 560

$mainWindowPosY = 0

$windowLength = 200

$labelLength = 25

$inputLength = 120

$buttonLength = $windowLength - ($labelLength + $inputLength)

$mainwindow = GUICreate("",$windowLength,40, $mainWindowPosX, $mainWindowPosY, $GUIStyle, $GUIStyleEx)

GUICtrlCreateLabel ("URL", 0, 0, $labelLength)

$URLInput = GUICtrlCreateInput ("", $labelLength, 0, $inputLength, 20) ; will not accept drag&drop files

GUICtrlCreateLabel ("Dest.", 0, 20, $labelLength)

$destInput = GUICtrlCreateInput ("", $labelLength, 20, $inputLength, 20) ; will not accept drag&drop files

$go = GUICtrlCreateButton ("GO!", $labelLength + $inputLength, 0, $buttonLength, 20)

$browse = GUICtrlCreateButton ("Browse...", $labelLength + $inputLength, 20, $buttonLength, 20)

GUISetOnEvent($GUI_EVENT_CLOSE ,"CLOSEClicked")

GUICtrlSetOnEvent($go ,"getFile")

GUICtrlSetOnEvent($browse ,"getDestPath")

GUISetState ()

While 1

Sleep(1000)

Wend

Func getFile()

GUICtrlSetState ( $go, $GUI_DISABLE )

If GUICtrlRead($URLInput) = "" Or GUICtrlRead($destInput) = "" Then

MsgBox(0,"Fill up the fields", "Please fill up the blank fields.")

Else

InetGet( GUICtrlRead($URLInput), GUICtrlRead($destInput) )

EndIf

GUICtrlSetState ( $go, $GUI_ENABLE )

EndFunc

Func getDestPath()

$destPath = FileSaveDialog("Save To","","(*.*)",8)

If @error <> 1 Then GUICtrlSetData($destInput,$destPath)

EndFunc

Func CLOSEClicked()

Exit

EndFunc

This is a program that will download a webpage to your PC. :D

Note: Ctrl + Q to quit the program. :huh:

The Question: :D

- Is there a way to select the text inside the inputbox when I click on it?

- Is there a way that I can hide it with a hotkey and unhide it when my mouse cursor moves over a pixel on the screen. Example(coords (0,0) top left corner)

Thanks... :)

[font="Arial"]Thanks[/font]
If @error = me Then $sorry
Else
   Do
      $clarifyMe
   Until $meClear
EndIF
MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)
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...