Jump to content
Sign in to follow this  
searchresult

please help

Recommended Posts

searchresult

Ok how to print just one selected line from a listbox, but with some temp text around it like when you print a bill. you have firm name and stuff that must go there all the time and need to imput selected text from a list box then print it out.

Thanks

Share this post


Link to post
Share on other sites
PsaltyDS

Look at ControlCommand(), which has options to tell you how many items are in a list box, which item is selected, read the text of a particular item, etc. There are also some functions specific to the ListBox, like _GuiCtrlListFindString() that will help you find the item you are interested in.

:)


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
searchresult

Look at ControlCommand(), which has options to tell you how many items are in a list box, which item is selected, read the text of a particular item, etc. There are also some functions specific to the ListBox, like _GuiCtrlListFindString() that will help you find the item you are interested in.

:)

I was trying something like this:

but it doesn't work

Case $Button1

$line = GUICtrlRead($List1)

$print = _FilePrint($line)

If $print Then

MsgBox(64, "Račun", "Račun je ispisan.")

Else

MsgBox(48, "Račun", "Greka: " & @error & @CRLF & "Račun nije ispisan.")

EndIf

Share this post


Link to post
Share on other sites
Kip

_FilePrint can only print a file, not a string.

If you want to print it with FilePrint, do something like this

$Line = GUICtrlRead($List1)

$file = FileOpen("Print.txt", 2)
FileWrite($file, $Line)

$print = _FilePrint("Print.txt")

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  

×