
clarinets101
Active Members-
Posts
31 -
Joined
-
Last visited
clarinets101's Achievements

Seeker (1/7)
0
Reputation
-
I have a utility that I wrote to assign printers from a list in an ini file to a host name, for a printer mapping utility. My issue is that as the printer list grows, sometimes it can be difficult to determine which printer is needed just based on the name. I know it's possible to have tool tips off of buttons, labels, and even the combolist dropdown button (using guictrlsettip), but what I would like to accomplish is a tooltip on one of the items in the dropdown as the mouse is hovered over it based off the location in the ini file that lists the printers. I have performed several google searches and couldn't find anything right off. Maybe I'm not searching the right terms. Please advise. ini file example: [PrinterName] Installed=Y/N Location=Printer Location Model=Printer Model IP=IP Address Script Example: #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> $hostini=@ScriptDir&"\host.ini" $printerini=@ScriptDir&"\printers.ini" $printers=IniReadSectionNames($printerini) $string="" $aprinters=IniReadSectionNames($printerini) $sprinters="" for $i = 1 to $aprinters[0] $sprinters &= "|" & $aprinters[$i] Next $ahosts=IniReadSectionNames($hostini) $shosts="" For $j=1 To $ahosts[0] $shosts&="|"&$ahosts[$j] Next #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Host.ini", 181, 402, -1, -1) $Label1 = GUICtrlCreateLabel("Host Name:", 16, 24, 60, 17) $Label2 = GUICtrlCreateLabel("Printer 1:", 16, 80, 46, 17) $Combo6 = GUICtrlCreateCombo("", 16, 48, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SORT,$CBS_UPPERCASE)) $Combo1 = GUICtrlCreateCombo("", 16, 104, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SORT)) $Label3 = GUICtrlCreateLabel("Printer 2:", 16, 136, 46, 17) $Combo2 = GUICtrlCreateCombo("", 16, 160, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SORT)) $Label4 = GUICtrlCreateLabel("Printer 3:", 16, 192, 46, 17) $Combo3 = GUICtrlCreateCombo("", 16, 216, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SORT)) $Label5 = GUICtrlCreateLabel("Printer 4:", 16, 248, 46, 17) $Combo4 = GUICtrlCreateCombo("", 16, 272, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SORT)) $Label6 = GUICtrlCreateLabel("Printer 5:", 16, 304, 46, 17) $Combo5 = GUICtrlCreateCombo("", 16, 328, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SORT)) $Button1 = GUICtrlCreateButton("OK", 120, 360, 43, 25) $Button2 = GUICtrlCreateButton("Reset", 16, 360, 43, 25) $Button3 = GUICtrlCreateButton("Delete", 68, 360, 43, 25) guictrlsetdata($Combo1, $sprinters, "") guictrlsetdata($Combo2, $sprinters, "") guictrlsetdata($Combo3, $sprinters, "") guictrlsetdata($Combo4, $sprinters, "") guictrlsetdata($Combo5, $sprinters, "") guictrlsetdata($Combo6, $shosts, "") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Combo6 $printer1=IniRead($hostini,GUICtrlRead($Combo6),"Printer1","") $printer2=IniRead($hostini,GUICtrlRead($Combo6),"Printer2","") $printer3=IniRead($hostini,GUICtrlRead($Combo6),"Printer3","") $printer4=IniRead($hostini,GUICtrlRead($Combo6),"Printer4","") $printer5=IniRead($hostini,GUICtrlRead($Combo6),"Printer5","") GUICtrlSetData($Combo1,$printer1) If $printer2 = "" Then GUICtrlSetData($Combo2, $sprinters, "") Else GUICtrlSetData($Combo2,$printer2) EndIf If $printer3 = "" Then GUICtrlSetData($Combo3, $sprinters, "") Else GUICtrlSetData($Combo3,$printer3) EndIf If $printer4 = "" Then GUICtrlSetData($Combo4, $sprinters, "") Else GUICtrlSetData($Combo4,$printer4) EndIf If $printer5 = "" Then GUICtrlSetData($Combo5, $sprinters, "") Else GUICtrlSetData($Combo5,$printer5) EndIf Case $Button1 IniWrite($hostini,GUICtrlRead($Combo6),"Printer1",GUICtrlRead($Combo1)) IniWrite($hostini,GUICtrlRead($Combo6),"Printer2",GUICtrlRead($Combo2)) IniWrite($hostini,GUICtrlRead($Combo6),"Printer3",GUICtrlRead($Combo3)) IniWrite($hostini,GUICtrlRead($Combo6),"Printer4",GUICtrlRead($Combo4)) IniWrite($hostini,GUICtrlRead($Combo6),"Printer5",GUICtrlRead($Combo5)) $aprinters=IniReadSectionNames($printerini) $sprinters="" for $i = 1 to $aprinters[0] $sprinters &= "|" & $aprinters[$i] Next $ahosts=IniReadSectionNames($hostini) $shosts="" For $j=1 To $ahosts[0] $shosts&="|"&$ahosts[$j] Next GUICtrlSetData($Combo6,$shosts,"") GUICtrlSetData($Combo1, $sprinters, "") GUICtrlSetData($Combo2, $sprinters, "") GUICtrlSetData($Combo3, $sprinters, "") GUICtrlSetData($Combo4, $sprinters, "") GUICtrlSetData($Combo5, $sprinters, "") Case $Button2 $aprinters=IniReadSectionNames($printerini) $sprinters="" for $i = 1 to $aprinters[0] $sprinters &= "|" & $aprinters[$i] Next $ahosts=IniReadSectionNames($hostini) $shosts="" For $j=1 To $ahosts[0] $shosts&="|"&$ahosts[$j] Next GUICtrlSetData($Combo6,$shosts,"") GUICtrlSetData($Combo1, $sprinters, "") GUICtrlSetData($Combo2, $sprinters, "") GUICtrlSetData($Combo3, $sprinters, "") GUICtrlSetData($Combo4, $sprinters, "") GUICtrlSetData($Combo5, $sprinters, "") Case $Button3 $msgbox=MsgBox(52,"Remove?","Are you sure you want to remove the configuration for: "&GUICtrlRead($Combo6)&"?") If $msgbox=6 Then IniDelete($hostini,GUICtrlRead($Combo6)) $aprinters=IniReadSectionNames($printerini) $sprinters="" for $i = 1 to $aprinters[0] $sprinters &= "|" & $aprinters[$i] Next $ahosts=IniReadSectionNames($hostini) $shosts="" For $j=1 To $ahosts[0] $shosts&="|"&$ahosts[$j] Next GUICtrlSetData($Combo6,$shosts,"") GUICtrlSetData($Combo1, $sprinters, "") GUICtrlSetData($Combo2, $sprinters, "") GUICtrlSetData($Combo3, $sprinters, "") GUICtrlSetData($Combo4, $sprinters, "") GUICtrlSetData($Combo5, $sprinters, "") Else $aprinters=IniReadSectionNames($printerini) $sprinters="" for $i = 1 to $aprinters[0] $sprinters &= "|" & $aprinters[$i] Next $ahosts=IniReadSectionNames($hostini) $shosts="" For $j=1 To $ahosts[0] $shosts&="|"&$ahosts[$j] Next GUICtrlSetData($Combo6,$shosts,"") GUICtrlSetData($Combo1, $sprinters, "") GUICtrlSetData($Combo2, $sprinters, "") GUICtrlSetData($Combo3, $sprinters, "") GUICtrlSetData($Combo4, $sprinters, "") GUICtrlSetData($Combo5, $sprinters, "") EndIf EndSwitch WEnd
-
I know the rules, don't ask for people to write your script for you.. i just need a nudge in the right direction or just tell me if it's not possible. Here's the skinny, I have an application that shows maps of different areas. I need to have four areas displayed on the screen, the problem I have is the window isn't laid out well to manipulate the window(s) to easily display the maps. My thoughts are if i can have each map where it can be seen then map out the coordinates to a "magnification tool" of some sort and re-display it in it's on GUI quartered out on the screen with the "screwed" up maps in the background as there is only one monitor hooked to these computers. I have been unable to find much on something like this, except for an old post referring to an iGZoom which I think was from back in 2005 and I haven't been able to find anything else on it. If have performed multiple search queries so I figured I would go ahead and ask the experts. Thank you
-
Gui in a website CGI control
clarinets101 replied to clarinets101's topic in AutoIt GUI Help and Support
Ok, the script is running as written. It launches a gui and I have an On and an Off for each relay. If I run the script on the "web server" that has the arduino connected to it locally everything works fine. I can turn the relays on and off without any issues. Now i need for that "gui" to run in my webpage and i'll mainly be using it locally in the house for home automation but if i can get working well internally i'll open the ports up and control things remotely. I also have found some info on using CGI but i don't have a good understanding of it so if anyone could help with that even though this isn't that kind of forum. I'm open to all and any suggestions. Thanks -
Ok, I don't know if this is even possible but some help would be greatly appreciated. I've been googling like crazy and trying different things but i'm just not getting anywhere. I'm trying to control an arduino from an Autoit script ... over the web. I have a script that is working and i have serial communication figured out. currently the script is simple and turns a couple of relays on and off. what i'd like now is to do this from a webpage. ideally a gui interface like the one i have now would be great but i've also tried using cgi to launch a script that turns on a relay (so two links one to run a script to turn on and one to turn off) but after the script runs i get an error page. I'd like to set it up where if i can't have the gui then i can click the link run the script but stay on the same page. I hope all of this is making sense. Here is a copy of the gui script that is working: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;Include the Serial UDF #include 'CommMG.au3' #include #include #include #include #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 301, 221, 192, 124) $Label1 = GUICtrlCreateLabel("Circuit 2", 32, 88, 42, 17) $Label2 = GUICtrlCreateLabel("Circuit 1", 32, 32, 42, 17) $Checkbox1 = GUICtrlCreateCheckbox("ON", 32, 56, 33, 17) $Checkbox2 = GUICtrlCreateCheckbox("OFF", 72, 56, 41, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Checkbox3 = GUICtrlCreateCheckbox("ON", 32, 112, 33, 17) $Checkbox4 = GUICtrlCreateCheckbox("OFF", 72, 112, 41, 17) GUICtrlSetState(-1, $GUI_CHECKED) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;Internal for the Serial UDF Global $sportSetError = '' ;COM Vars Global $CMPort = 4 ; Port Global $CmBoBaud = 9600 ; Baud Global $CmboDataBits = 8 ; Data Bits Global $CmBoParity = "none" ; Parity Global $CmBoStop = 1 ; Stop Global $setflow = 2 ; Flow ;Start up communication with the Arduino _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _commsendstring("10" & @CR) _commsendstring("20" & @cr) Exit Case $Checkbox1 guictrlsetstate($Checkbox1, $GUI_CHECKED) GUICtrlSetState($Checkbox2, $gui_unchecked) _CommSendstring("11" & @CR) Case $Checkbox2 GUICtrlSetState($checkbox2, $GUI_CHECKED) GUICtrlSetState($Checkbox1, $gui_unchecked) _CommSendString("10" & @CR) Case $Checkbox3 guictrlsetstate($Checkbox3, $GUI_CHECKED) GUICtrlSetState($Checkbox4, $gui_unchecked) _CommsendString("21" & @cr) Case $Checkbox4 guictrlsetstate($Checkbox4, $GUI_CHECKED) GUICtrlSetState($Checkbox3, $gui_unchecked) _commsendstring("20" & @cr) EndSwitch WEnd Thank you in advance
-
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
Ok, i think i've got it figured out... i have to apologize, it only seems to happening on my computer... but that being said only to a removable drive. i can copy the files to a folder on the c: drive but something about copying the autorun.inf to a removable drive on my computer and only when i run it from a compile exe. Like i said it's weird i can run it just fine from the editor, i don't know what the difference in the two could be. So consider this issue closed, i don't know what to think, once again i'm sorry for wasting your time. And it kind of doesn't surprise me with my computer lol, i'm constantly trying stuff out and testing things on it. It's long over due for a reinstall *shivers* -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
I'm running from a network share. I don't know then, i'll figure out a work around or something. -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
can you replicate this issue on your side? setup a script to do a simple filecopy("c:temp1*.*","c:temp2") and in the temp1 directory but several files including an autorun.inf? -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
The script just exits... no errors no nothing. Like i've said it's really wierd. I use script editor to write the script, press f5 to test. all the files copy no problem script runs and finishes. i press f7 and build the exe then run the exe and the script runs up until it copies the autorun.inf file then the process closes and the tray icon disappears when i hover my mouse over it. The only thing it is having problems with is the autorun.inf. I can rename the same file works fine, even if i create a blank autorun.inf file it still acts the same. I even thought ok i'll "create" the autorun.inf file manually in the script but as soon as it goes to create the file same thing. I even disabled my anti-virus ... same thing. -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
even with filecopy it's still killing the script. I don't know why but i can use filecopy just fine without the autorun.inf file in the directory that i am copying the files from... but if there is a file in there named autorun.inf it kills the script, but not if i use f5 out of script editor. I don't understand this doesn't make sense. -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
_filecopy(@scriptdir & "\truecrypt\*.*",$drive & "TrueCrypt\") Func _FileCopy($fromFile,$tofile) Local $FOF_RESPOND_YES = 16 Local $FOF_SIMPLEPROGRESS = 256 $winShell = ObjCreate("shell.application") $winShell.namespace($tofile).CopyHere($fromFile,$FOF_RESPOND_YES) EndFunc I'll take a look at your script but this is a snipit from mine... basically it opens the windows file copy dialogue. and like i mentioned it works great if i don't have that autorun.inf file in the directory. and i just tried a filemove to rename the file but same thing the script closes out. autoit just does not like autorun.inf files it looks like. -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
Ok, I think i've got it figured out. I had a "autorun.inf" file to be copied. for some reason that file was causing the script to end. rename it to something else works just fine. The strange thing is it would work just fine unless ran as an executable. so i guess i'll have it copy it over as a "tmp file" then rename it. and suggestions as to why this "broke" the script? -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
I am trying to copy files, but i wanted a progress bar ... i am open to suggestions though. -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
ok, thank you BrewMan installing the "full" version seem to have done the trick allowing me to add the msgbox debug, plus it looks like i've got a lot more options in the script editor. So now i need same assistance with my script. on $winShell.namespace($tofile).copyhere($fromfile,$fof_respond_yes) seems to be where it stops working but i don't get a msgbox after it runs because the script just closes out. Func _fileCopy($fromFile,$tofile) Local $FOF_RESPOND_YES = 16 Local $FOF_SIMPLEPROGRESS = 256 $winShell = ObjCreate("shell.application") MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & ' $winShell' & @lf & @lf & 'Return:' & @lf & $winShell) ;### Debug MSGBOX $winShell.namespace($tofile).CopyHere($fromFile,$FOF_RESPOND_YES) MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & ' $winShell.namespace' & @lf & @lf & 'Return:' & @lf & $winShell.namespace) ;### Debug MSGBOX EndFunc if i "F5" the script now the msgbox errors out and if i build it it does the same thing it's been doing where the script just closes out after it starts copying. -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
ok, i don't know what i'm doing wrong but when i click the option from tools or i press the keys "ctrl+shift+d" nothing happens, is something supposed to? -
Script not working after build
clarinets101 replied to clarinets101's topic in AutoIt General Help and Support
Ok, well I apologize for my ignorance, exactly how do i use the msgbox for debugging? I click the option from tools but nothing happens.