Jump to content

MattNis

Active Members
  • Posts

    104
  • Joined

  • Last visited

MattNis's Achievements

Adventurer

Adventurer (3/7)

0

Reputation

  1. can you post what each of the sub_items are?
  2. if the text is highlighted...can't you send a Control+C to copy the text and then read it from the clipboard?
  3. use a free OCR program. you should be able to find a bunch of them on google easily
  4. Since the API functionality has not been implemented in AutoIT, I have been using a version of the code below. It works well in the released version (the cursor stays within the square), but the script lets the cursor jump out of the square in the latest beta. HotKeySet("!e","E") AutoITSetOption("SendKeyDelay",0) AutoITSetOption("WinWaitDelay",0) while(1) $pos = MouseGetPos() $x = $pos[0] $y = $pos[1] Select Case $pos[0] > 600 MouseMove(600, $y,0) Case $pos[0] < 400 MouseMove(400, $y,0) Case $pos[1] > 400 MouseMove($x, 400,0) CASE $pos[1] < 200 MouseMove($x, 200,0) endSelect wend func E() Exit endfunc
  5. how about replacing the $cd and $cdlocal variables with an array? and some other changes i haven't tried this, but seems like it should work AutoItSetOption("WinTitleMatchMode", 4) AutoItSetOption("TrayIconDebug", 1) ;(----------------------This is a list of the CD's in Inventory----------------------) ;===Directory Information=== $IniFile = @ScriptDir & "\settings.ini" $cdloaderdir = IniRead ($IniFile , "Misc", "cdloaderdir","nf_error") $AlcoholDir = @ProgramFilesDir & "\Alcohol Soft\Alcohol 120\" ;===Mount util Command=== $alcoholcmd = IniRead ($IniFile , "Command", "alcoholcmd","nf_error") $Mount = IniRead ($IniFile , "Command", "mount","nf_error") $Unmount = IniRead ($IniFile , "Command", "unmount","nf_error") ;===Player Stuff=== $trayplaymessage = IniRead($IniFile, "Misc", "trayplaymessage","nf_error") $playername = IniRead ($IniFile, "Misc", "playername","nf_error") ;===Track Movements=== $nexthotkey = IniRead ($IniFile, "Track Movement", "next","nf_error") $previoushotkey =IniRead ($IniFile, "Track Movement", "previous","nf_error") ; first dimention is $cdX and second is $CDXLocal Global $cd[6][2] ;===Names of CD's=== for $i = 0 to 5 $cd[$i][0] = IniRead($IniFile, "CD Titles", "cd" & $i,"nf_error") ;==Location and filenames of CD's=== $cd[$i][1] = IniRead($IniFile, "CD Locations", "CD" & $i & "local","nf_error") next ;(----------------------This is the start of the loop----------------------) $loopy = 0 while $loopy = 0 $input = InputBox ( "CD Loader", "type here (type list for help)","","",170,40,0,0) If @error then exit ;(----------------------Here are the commands for input values----------------------) elseif $input = "list" then MsgBox(0, "CD inventory List", $cd1 & @CRLF & $cd2 & @CRLF & _ $cd3 & @CRLF & $cd4 & @CRLF & $cd5 & @CRLF & $cd6) elseif $input = "forward" OR $input = "next" then My1stFuncingExperience($nexthotkey) elseif $input = "back" OR $input = "previous"then My1stFuncingExperience($previoushotkey) elseif StringInArray($input) >= 0 then My2ndFuncingExperience($input, $cd[StringInArray($input)][1]) else msgbox(48,"CD Loader information","'" & $input & "'" & " was not found in the database") endif wend Func My2ndFuncingExperience(ByRef $parm1, ByRef $parm2) ProgressOn("CD Loader", "Closing Existing Player", "0 percent") winclose($playername) ProgressSet(0 , "CD Loader", "Un-Mounting Old Image") RunWait(@COMSPEC & $Unmount, $AlcoholDir, @SW_HIDE) ProgressSet(20 , "CD Loader", "Mounting New Image") RunWait(@COMSPEC & $Mount & $parm2, $AlcoholDir, @SW_HIDE) ProgressSet(40 , "CD Loader", "Waiting For Player") winwait($playername) ProgressSet(60 , "CD Loader", "Minimizing Player") WinSetState ($playername,"",@SW_MINIMIZE) ProgressSet(80 , "CD Loader", "Opening Tray Message") TrayTip ($trayplaymessage,$parm1,20,1) ProgressSet(100 , "CD Loader", "Finalizing...") sleep(1000) ProgressOff() EndFunc Func My1stFuncingExperience(ByRef $parm1) winactivate($playername) winwait($playername) send($parm1) WinSetState ($playername,"",@SW_MINIMIZE) EndFunc ; A form of this function should really exist as part of the standard includes Func StringInArray(ByRef $param1) for $x = 0 to 5 if $cd[$x][0] = $param1 then return $x next return -1 endFunc
  6. wow, that code has soooo much code duplication that it made my eyes hurt. you can probably cut down the size the length of the script by %80
  7. How can I determine the user that has currently locked the use of a file? I am unable to open something because another user is currently using a file. thanks
  8. do a netstat before and after the "Window"
  9. do you also want to know which files were changed or modified?
  10. look into using netsh on win2k
  11. file not available for download
  12. originally I thought eval would do the same thing as you did, Trids. something like... $val = active eval("WinWait" & $val(window name, text))
  13. That's mostly how I handle installs too....and have a nice splash screen up while it's installing.... While Not WinExists( $title, $text ) Sleep( "10" ) Wend I just have a problem with that part of the code. The window will most likely flash briefly before it's hidden. Just use WinWait($title, $text) Jon, Is there way to create an AutoIT built-in command that will hide a window as well as all of it's child windows that may appear?
  14. There is an API call to check if computer is connected to the internet. Any plans on incorporating it?
  15. Sometimes usefull if you use a very long sleep command and want to know how soon it will be over $time = time in seconds (not milliseconds) Version 1 Opt("TrayIconDebug",1) _sleep(500) func _sleep($time) for $k = 1 to $time TrayTip("clear","", 0); TrayTip("",$time - $k, 1); Sleep(1000); next endfunc Version 2 Opt("TrayIconDebug",1) HotKeySet("!z", "_timerDisplay") _sleep(500) func _sleep($time) Global $timer = $time Global $Begin = TimerStart() Sleep($timer*1000) endfunc func _timerDisplay() TrayTip("clear","",0) TrayTip("",Round(((1000*$timer)-TimerStop($Begin))/1000), 1) endfunc
×
×
  • Create New...