Jump to content

drever44

Active Members
  • Posts

    20
  • Joined

  • Last visited

drever44's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. #cs ---------------------------------------------------------------------------- Author: Aaron Marsh Script: Sets the F9 Key to a word #ce ---------------------------------------------------------------------------- #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> #NoTrayIcon Local $getword Local $form ;Function HotKeySet("{f9}", "capturef9") Func capturef9() HotKeySet("{f9}") Send($getword) HotKeySet("{f9}", "capturef9") EndFunc ;==>capturef9 HotKeySet("+!9", "menuf9") Func menuf9() HotKeySet("+!9") GUISetState(@SW_SHOW, $form) HotKeySet("+!9", "menuf9") EndFunc ;==>menuf9 ;Gui $form = GUICreate("Main Menu", 430, 300, 677, 324) GUISetFont(12, 400, 0, "Courier New") $Group1 = GUICtrlCreateGroup("Choose a word to assign to the 'F9' Key", 5, 5, 415, 200) $checkbox1 = GUICtrlCreateRadio("Default Word", 48, 72, 153, 17) $checkbox2 = GUICtrlCreateRadio("Default Word 2", 48, 104, 169, 17) $checkbox3 = GUICtrlCreateRadio("Default Word 3", 48, 136, 193, 17) $checkbox4 = GUICtrlCreateRadio("Default Word 4", 48, 168, 193, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $setbutton = GUICtrlCreateButton("Set", 76, 230, 81, 33, $WS_GROUP) $quitbutton = GUICtrlCreateButton("Quit", 268, 230, 81, 33, $WS_GROUP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $form) EndSwitch Select Case $nMsg = $setbutton If GUICtrlRead($checkbox1) = $GUI_CHECKED Then $getword = "Default Word" TrayTip("", "F9 has been set to " & $getword, 5) GUISetState(@SW_HIDE, $form) EndIf If GUICtrlRead($checkbox2) = $GUI_CHECKED Then $getword = "Default Word 2" TrayTip("", "F9 has been set to " & $getword, 5) GUISetState(@SW_HIDE, $form) EndIf If GUICtrlRead($checkbox3) = $GUI_CHECKED Then $getword = "Default Word 3" TrayTip("", "F9 has been set to " & $getword, 5) GUISetState(@SW_HIDE, $form) EndIf If GUICtrlRead($checkbox4) = $GUI_CHECKED Then $getword = "Default Word 4" TrayTip("", "F9 has been set to " & $getword, 5) GUISetState(@SW_HIDE, $form) EndIf Case $nMsg = $quitbutton Exit EndSelect WEnd nice little script i played around with it a lil and changed the check box's to radio's to fix the multiple selection issue. works nice
  2. $NM_RETURN is very disappointing. this seams to have been a problem for some time now, so i don’t suppose that it will be corrected any time soon, looked for a work around for several hours and found nothing that will work correctly with my script. after putting all this time into my project and only to find out that i cant use the enter key on a list-view is overwhelmingly sad. is there possibly a UDF out there that will correct this issue or am i just not seeing this correctly. perhaps in the bata version this will be corrected. Simply want to left click an item in the list-view and hit return to open an edit window/gui how hard can that be. and also having a little trouble with double left click and left click defined at the same time. no mater how fast you double click left click always happens. is this not possible also same with right click and double right click. if not i can live with out the doubles. any help would be greatly appreciated
  3. oh i was talking about the example, so i could better understand how to use the new command. (<-- tweaking)
  4. Sweeeeeeeeeeet! Verry Nice. will have to tweek tork and maby adjust it a lil but thats exactly it, however i am a little suprised that this is not already apart of autoit. Thanks a million.
  5. hello to all I have been serching for an example of how to drag the devider between two controls in one gui, as to resize them both at the same time, not shure what this would be called and have tried every thing i could think of in the help search to find such a control or resizeing method, even tried koda to see if that might give me some hint as to how to do this. Not shur if sizebox is the right method but here is what I have done to better explane what I am trying to do here. #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 625, 443, 192, 124,$WS_SIZEBOX) $ListView1 = GUICtrlCreateListView("", 8, 8, 320, 430,$WS_SIZEBOX) $ListView2 = GUICtrlCreateListView("", 320, 8, 290, 430,$WS_SIZEBOX) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd any idea if it is possable to combine both the inner frames of the two listviews to acheave a dragable resize devider. have no problem looking it up in the help section however not really shure what to search for. thank you
  6. ok i got the case part to work will edit the script in earlier post but still want the popup menu to work only on an item in the list view not just any whare. just had to walk away from it for a few and then relised daaa.
  7. wow just googled "windows7" and i must say that it is lookin a lot like a cross of linux and mac. i wont windows more then xp i will go mac or linux b4 any more microsoft. thanks for the reply i understand
  8. was wondering if you recieved my pm and if so have you had a chance to look at the link. if not no rush just wasn't shure if i pm'ed you properly or not man i hate being the newbie. thanks.
  9. Ok I have that finished now i figured it out thank you for the help. I am now on a new issue with stringregexp and perhaps you could help me once more. i want to return a complete "<table> .*? </table>" from a string using stringregexp the problem is that the table is on multiple lines and the number of @cr in the table very, Is this possible? if not what function should i use. thank you.
  10. I am having a little trouble with implementing a progress bar into this script, I have attempted and failed. This script works fine however there is no way of knowing how long or how much longer it will take to complete. I am dealing with a large number of images, around 30,000 + so I dont expect it happen immediately. My attempt worked fine but the progress window blinked repeatedly which was not to bad but around 34% or so the progress window stops blinking and my entire desktop begins to blink. Wow what a flash back. Here is the script before the attempt of adding the progress bar. #include <File.au3> ;#include <Array.au3> $dir = RegRead("HKEY_CURRENT_USER\Software\Collectorz.com\Movie\Settings", "ImageBaseFolder") $coverjpg = _FileListToArray($dir, "*.jpg") $covergif = _FileListToArray($dir, "*.gif") $links = _FileListToArray($dir, "*.txt") If @error Then MsgBox(0, "ERROR!!!", "No Text File Found.") Exit EndIf $database = FileRead($dir & $links[1]) $orphan = $dir & "Orphaned\" $jmarker = 100 / $coverjpg[0] $gmarker = 100 / $covergif[0] If $links[0] > 1 Then MsgBox(0, "ERROR!", "To manny Text Files Found Please Remove old files!") Exit EndIf ;<----- Search JPG Files -----> $t = 0 $j = 0 Do $t = $t + 1 $checklink = StringInStr($database, $coverjpg[$t]) If $checklink = 0 Then $j = $j + 1 $move = FileMove($dir & $coverjpg[$t], $orphan & $coverjpg[$t], 8) EndIf Until $t = $coverjpg[0] ;<----- Search GIF Files -----> $t = 0 $g = 0 Do $t = $t + 1 $checklink = StringInStr($database, $covergif[$t]) If $checklink = 0 Then $g = $g + 1 $move = FileMove($dir & $covergif[$t], $orphan & $covergif[$t], 8) EndIf Until $t = $covergif[0] FileMove($dir & $links[1], $orphan & $links[1]) MsgBox(0, "Progress", "Total of " & $j + $g & " files moved") And here is my attempt #include <File.au3> ;#include <Array.au3> $dir = RegRead("HKEY_CURRENT_USER\Software\Collectorz.com\Movie\Settings", "ImageBaseFolder") $coverjpg = _FileListToArray($dir, "*.jpg") $covergif = _FileListToArray($dir, "*.gif") ;<----- $links is a generated list of all images linked to my database, "the actual links" -----> $links = _FileListToArray($dir, "*.txt") If @error Then MsgBox(0, "ERROR!!!", "No Text File Found.") Exit EndIf $database = FileRead($dir & $links[1]) $orphan = $dir & "Orphaned\" $jmarker = 100 / $coverjpg[0] $gmarker = 100 / $covergif[0] If $links[0] > 1 Then MsgBox(0, "ERROR!", "To manny Text Files Found Please Remove old files!") Exit EndIf ;<----- Search JPG Files -----> $t = 0 $j = 0 For $i = 0 To 100 Step $jmarker $p = StringFormat("%1.4s", $i) $t = $t + 1 $checklink = StringInStr($database, $coverjpg[$t]) If $checklink = 0 Then $j = $j + 1 $move = FileMove($dir & $coverjpg[$t], $orphan & $coverjpg[$t], 8) EndIf ProgressOn("Progress Meter .jpg", $coverjpg[$t], "0 %") ProgressSet($p, "%" & $p & " " & $j & " Files Moved") Next ProgressSet(100, "Done", "Complete") Sleep(500) ProgressOff() ;<----- Search GIF Files -----> $t = 0 $g = 0 For $i = 0 To 100 Step $gmarker $p = StringFormat("%1.4s", $i) $t = $t + 1 $checklink = StringInStr($database, $covergif[$t]) If $checklink = 0 Then $g = $g + 1 $move = FileMove($dir & $covergif[$t], $orphan & $covergif[$t], 8) EndIf ProgressOn("Progress Meter .gif", $covergif[$t], "0 %") ProgressSet($p, "%" & $p & " " & $g & " Files Moved") Next ProgressSet(100, "Done", "Complete") Sleep(500) ProgressOff() FileMove($dir & $links[1], $orphan & $links[1]) MsgBox(0, "Progress", "Total of " & $j + $g & " files moved") Can someone tell me why this is not working? Or perhaps offer a better solution? Thank You
  11. Thanks I can actually understand that now and also I went back and started to reread the help files and found a tutorial on stringregexp that I must have overlooked before and that also helped a lot. Then came across @extended which really brought light to the [0] deal. This is very intriguing to me, I did a 48 hour session straight threw playing around with the stringregexp in a while loop using the @extended and I must say its a little tricky but can see the need for it now. I was able to extract the name from a HTML file and replace all the &#XXX; instances with its corresponding characters so I have made some achievements since my first post. However I have experienced some issues, a few times I had a hard crash and once in a while it seams to skip over the &#XXX; for some reason, sort of like it is running so fast it trips. In the help file it sad that open and close was not necessary but it was good practice to do it that way so that was why I did it. And also I was kind of playing around with stringinstr, am I understanding that this function will not produce a string but only tell you if it exists? And my last question, is it possible to do the equivalent to stringregexp with out the array, for the script that I have in mind will probably contain 30 to 35 stringregexp unless you think this is not overusing it?
  12. Sorry when I mentioned handles I was referring to the list below matching characters in the function help for stringregexp but I am getting to understand them a little better, I have been messing around with them and came up with this but I am not shire that it is exactly correct. So I have sort of taken a step back from what you posted for me last and were trying to do something a little easier so I can better understand the functionality of stringregexp so for the learning experience I am trying to extract the name of a HTML page to a string and also there is an ocasional &#xxx; html code that I will have to work out later. FileOpen(c:/html/0012.html, 0) $myfile = FileRead(c:/html/0012.html) FileClose(c:/html/0012.html) $name = StringRegExp($myfile, '<title>(.*?)</title>', 1) MsgBox(0, "Output", $name[0], 20) I have declared the strings before using them and I am using a msgbox for testing the string just to see if it is outputting what I want. However I am not understanding why I have to have [0] after the string name to view it in the message box. Or even use it in combination with other strings for that matter. I have searched the help files and not finding any definition of usage for this type of command if you call it that. How can I get this to work without using [0] for some times it errors out for seemingly no reason with a return error of ==> Subscript used with non-Array variable.: on the msgbox line. Perhaps you could point me in the right direction here. this is something i can do in just a few lines of code with vbscript. perhaps this is my problem for i keep thinking in vbscript. Many thanks.
  13. I have been trying to understand the many handles for this function and I must say I have had little luck. Perhaps something a little more simple like returning the title of a page between the <title> and </title> in the <head> could you provide me with links that would perhaps better explain this. Or maybe I am totally using the wrong function for doing this seemingly simple task. Oh and I have picked your examples apart and fiddled with them quite extensively and just can’t understand why it works.
  14. Well I am trying to accomplish several things here, I am an avid movie lover and I have created a large array of storage for my Store Bought Movies (over 14 terabytes) and also created several databases with Movie info and what not, actors and stuff. I wanted to cross reference them so if I click on an actor I get a list of the movies that the actor is in that I have. Then I can click on the movie and get that info and even watch it from any computer in my house, even sending it to my projector room for a family viewing. Most of my files are local and also I will be gathering some info such as biographies and stuff of the actors and plots for the movies. So my dataset is local and the data is not, if that makes sense. After all is done all info will be local for my server. And I would love to look at any examples that you would like to show me. The more the better. This is the best way for me to learn, I know that there is more then one way to skin a cat. Many Thanks.
×
×
  • Create New...