Sign in to follow this  
Followers 0
keen

Need some coding help

18 posts in this topic

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]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Put this

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

at the end of the code you want to run first

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

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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


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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

ok well i want the PC lock to open up then i want you to go through it and when you have entered the password an all it takes you to a GUI.


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

Share this post


Link to post
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


Share this post


Link to post
Share on other sites

Well i'm goin to disable the disable tast manager and all.

You also said that This was easy to make in koda. Its the hardest thing ever.


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

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Well i'm goin to disable the disable tast manager and all.

You also said that This was easy to make in koda. Its the hardest thing ever.

try GUIBuilder right next to Koda... its much easier and simpler

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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


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

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

What do i do with the script you gave me?


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

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Well thanks but that code already has a set password. I want it like the PC lock where you create the password but the password create only shows up once.


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

Share this post


Link to post
Share on other sites

I don't see the point of locking a program on your own machine

also just deleting the reg entry allows you to add a new one thus defeating the whole thing


Share this post


Link to post
Share on other sites

Well i dont want it to lock. The script you posted was fine but i want it like the PC lock at the beggening how you create the password.


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

Share this post


Link to post
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
Sign in to follow this  
Followers 0