Sign in to follow this  
Followers 0
keen

Making an edit box unediable

11 posts in this topic

Hoe can I make an edit box that will show up with a certain ini file in it and how can I make it so you cant edit things in it.


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

Share this post


Link to post
Share on other sites



Check out the style $ES_READONLY.

Share this post


Link to post
Share on other sites

What about making it open a file. I have a iniread but it isnt reading it.

current script:

#include <GUIConstants.au3>

GUICreate("Admin Panel", 724, 513, 254, 155, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS), 0)
GUISetBkColor(0x3D95FF)

$checkout = IniRead (@ScriptDir & "/checkout.ini", "","","Cannot Find Checkout File")
$return = IniRead (@ScriptDir & "/return.ini", "","","Cannot Find Return File")


GUICtrlCreateEdit($checkout, 16, 168, 273, 337, $ES_READONLY)
GUICtrlCreateEdit($return, 432, 168, 273, 337, $ES_READONLY)
GUICtrlCreateLabel("Books Checked Out:", 16, 136, 126, 20)
GUICtrlSetBkColor(-1, 0x3D95FF)
GUICtrlCreateLabel("Books Returned", 448, 136, 101, 20)
GUICtrlSetBkColor(-1, 0x3D95FF)
GUICtrlCreateLabel("Admin Panel", 168, 8, 339, 104)
GUICtrlSetFont(-1, 50, 800, 0, "Agency FB")
GUICtrlSetBkColor(-1, 0x3D95FF)
GUISetState(@SW_SHOW)


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

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

Share this post


Link to post
Share on other sites

You are missing Section and Key from reading IniRead.

IniRead ( "filename", "section", "key", "default" )

Share this post


Link to post
Share on other sites

You have blank section- and key-names, so you might want to consider filling those in..

Share this post


Link to post
Share on other sites

What is the section and key?


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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Understanding INIs isn't really that hard..

[section1]
key1=value1
key2=value2

[section2]
key1=value1
key2=value2

EDIT : Reading..

$value = IniRead("c:\myfile.ini", "section1", "key1", "notfound")
Edited by Helge

Share this post


Link to post
Share on other sites

Can you configure for me.


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

Share this post


Link to post
Share on other sites

Configure what ? I think I've fed you enough for today, and actually I'm thinking of configuring my bed

right now, so I will have to say no.

Share this post


Link to post
Share on other sites

If you want someone to help you "configure" the iniread functions. First you must post the contents of the ini file you are reading from(we need to know what is in it to configure iniread). You might also want to post the current up-to-date code of your script.

The more you post, the more help you are likely to receive. Be generous, after all, we aren't getting paid. :P


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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