Jump to content

Need some coding help


keen
 Share

Recommended Posts

I need to get this:

GUICreate("Personal Files",600,600)

$tab=GUICtrlCreateTab (1, 70, 600, 190)

$tab1=GUICtrlCreateTabitem ("Welcome")
GUICtrlCreateLabel("Test." & @CRLF & "asdf " & @CRLF & ".", 20, 120, 375, 100)

GUICtrlCreateTabitem ("")  ; end tabitem definition


GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

To appear after i do this:

Code Link

http://www.autoitscript.com/forum/index.ph...mp;#entry221995

Help pleat thx.

[center]Kesne's Bar & Grill[/center]

Link to comment
Share on other sites

I need to get this:

GUICreate("Personal Files",600,600)

$tab=GUICtrlCreateTab (1, 70, 600, 190)

$tab1=GUICtrlCreateTabitem ("Welcome")
GUICtrlCreateLabel("Test." & @CRLF & "asdf " & @CRLF & ".", 20, 120, 375, 100)

GUICtrlCreateTabitem ("") ; end tabitem definition
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

To appear after i do this:

Code Link

http://www.autoitscript.com/forum/index.ph...mp;#entry221995

Help pleat thx.

Put this

Run(@ComSpec & " /c Start" & '*Yourscript.au3*', "", @SW_HIDE)

at the end of the code you want to run first

Link to comment
Share on other sites

THnaks but where do i put my script because when i just put that nothing happens.

HI,

use full qualified path, or something like @ScriptDir & "\script.exe" if you want to put the second script in the samt folder as the first one.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I'm new at auto it. Sorry i dont get that.

You seem to be asking how to end one script by running another one. They are telling you to end the first script with a Run() command that will run the second script. If that is what you want, and it's not working, the first thing to check is the formatting of you Run() command. If you want help doing that, post what you have now so we can see what's up.

If that's not at all what you wanted, please clarify... :P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

add your gui as a function and call it after this in Lock function

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", 00000000)
        $Lock = 0
        MyGui()oÝ÷ Ù«­¢+ÙÕ¹5åÕ¤ ¤)U%
ÉÑ ÅÕ½Ðí½É´ÄÅÕ½Ðì°Ôäà°ÌÐØ°Ìàà°ÄÔ̤)U%MÑMÑÑ¡M]}M!=¤)]¡¥±Ä($ÀÌØíµÍôÕ¥Ñ5Í ¤(%M±Ð(%
ÍÀÌØíµÍôÀÌØíU%}Y9Q}
1=M($%á¥Ð(%
ͱÍ($$ììììììì(%¹M±Ð)]¹)á¥Ð)¹Õ¹

but are you sure you want to make people do something by locking thier pc

not a very nice thing to do and i would never use such dirty tactics

Link to comment
Share on other sites

well gui's are easy to make with koda

it's the adding of functions to make it do something that can be hard

so all you really need is to prevent your gui from showing without the right password

this might give you a better head start

#include <guiconstants.au3>
#include <string.au3>

$mypasswordcheck = "somelongstringwith1738940"

PassCheck()

Func UNLock()
; your gui goes here
MsgBox(0, "Hello", "Welcome to my test")
EndFunc

Func Pass()
    $PassWord = InputBox("Password Check", "Enter your password", "", "", 100, 100)
    If $PassWord = "" Then
        MsgBox(16, "error", "Invalid password.")
        Pass()
    Else
        RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\myprogram", "Password", "REG_SZ", _StringEncrypt(1, $PassWord, "4471"))
    EndIf
        PassCheck()
EndFunc

Func PassCheck()
$PassWord = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\myprogram", "Password")
$PassWord = _StringEncrypt(0, $PassWord, "4471")
    If $PassWord = $mypasswordcheck Then
        UNLock()
    Else
        Pass()
    EndIf
EndFunc
Edited by CWorks
Link to comment
Share on other sites

forgot about adding a way out

cancel button now exits program

Well it will make it but I dont know how to code the buttons.

look up GUICtrlCreateButton in help file to get an example

#include <guiconstants.au3>
#include <string.au3>

$mypasswordcheck = "somelongstringwith1738940"

PassCheck()

Func UNLock()
; your gui goes here
MsgBox(0, "Hello", "Welcome to my test")
EndFunc

Func Pass()
    $PassWord = InputBox("Password Check", "Enter your password", "", "", 100, 100)
    If @Error = 1 Then
         Exit
    Else
        RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\myprogram", "Password", "REG_SZ", _StringEncrypt(1, $PassWord, "4471"))
    EndIf
        PassCheck()
EndFunc

Func PassCheck()
$PassWord = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\myprogram", "Password")
$PassWord = _StringEncrypt(0, $PassWord, "4471")
    If $PassWord = $mypasswordcheck Then
        UNLock()
    Else
        Pass()
    EndIf
EndFunc
Edited by CWorks
Link to comment
Share on other sites

Func UNLock()

; your gui goes here

MsgBox(0, "Hello", "Welcome to my test")

EndFunc

anything you put in here will only run if password is correct

change this to whatever password you wish to use

$mypasswordcheck = "somelongstringwith1738940"

Edited by CWorks
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...