searchresult Posted May 5, 2007 Posted May 5, 2007 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
PsaltyDS Posted May 5, 2007 Posted May 5, 2007 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
searchresult Posted May 5, 2007 Author Posted May 5, 2007 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 workCase $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
Kip Posted May 5, 2007 Posted May 5, 2007 _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") MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now