TheRunner Posted September 21, 2010 Share Posted September 21, 2010 Hello,, Just wanted to stop by and say heeeeyo ;D Also had a question if anyone knows how to click the "windows Key" or something on the desktop w/o the posision ? Thanks, Runner Link to comment Share on other sites More sharing options...
wakillon Posted September 21, 2010 Share Posted September 21, 2010 Welcome to the forum ! Can you say what you want to do exactly ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
E1M1 Posted September 21, 2010 Share Posted September 21, 2010 Welcome. ControlClick() press f1 in scite and see help for this func. edited Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 21, 2010 Share Posted September 21, 2010 I think he means he want to open the start-menu .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
wakillon Posted September 21, 2010 Share Posted September 21, 2010 I think he means he want to open the start-menu I do not doubt but what does it start after ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
BrewManNH Posted September 21, 2010 Share Posted September 21, 2010 BTW, the keyboard shortcut for the Windows start menu key is CTRL-ESC, if that's any help to the whole conversation. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
TheRunner Posted September 21, 2010 Author Share Posted September 21, 2010 Thanks! Sorry got caught up in doing something else I am trying to set up a script that will run a regedit delete any "oracle" from there then add it back in using a reg file i have then change the environment variables path to what I have set or adding to the path. Any ideas ? Im still learnin how to get the controls to work and to click on what i want xD Thanks! Link to comment Share on other sites More sharing options...
E1M1 Posted September 21, 2010 Share Posted September 21, 2010 RegDelete() edited Link to comment Share on other sites More sharing options...
TheRunner Posted September 21, 2010 Author Share Posted September 21, 2010 (edited) Thought I would share what I got done. dim $a1[25] dim $string = "" $var = EnvGet("PATH") MsgBox(4096, "Path variable is:", $var) $a1 = StringSplit($var, ';', 1) For $i = 0 to $a1 if StringCompare($i,'0') <> 0 then $results = StringInStr($i, "ITEM TO FIND") if $results <> 0 Then $i = "" Else $string = $string & $i MsgBox(0,"String:",$string) $string = $string & ";" EndIf EndIf Next $result = RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "Path", "REG_EXPAND_SZ", $string) If $result = 1 Then EnvUpdate() EndIf Edited September 21, 2010 by TheRunner Link to comment Share on other sites More sharing options...
Spiff59 Posted September 21, 2010 Share Posted September 21, 2010 (edited) Thought I would share what I got done. Looks like you're off to a good start! A bit of a problem in the loop though... The first element of array $a1 (which is $a1[0]) will contain the total number of elements in the array, so your loop ought to begin: For $i = 1 to $a1[0] Since you're now starting at 1, you can dispense with the "$i <> 0" test... Edit: Inside the loop, you'll be wanting to deal with the actual data elements of your array by referencing "$a1[$i]". Stick an "#Include <Array.au3>" at the top of your script, and an "ArrayDisplay($a1)" right after your StringSplit(). For debugging purposes, those two statements will give you a good idea at how your array is constructed, and what it contains. Edited September 21, 2010 by Spiff59 Link to comment Share on other sites More sharing options...
TheRunner Posted September 22, 2010 Author Share Posted September 22, 2010 Looks like you're off to a good start! A bit of a problem in the loop though... The first element of array $a1 (which is $a1[0]) will contain the total number of elements in the array, so your loop ought to begin: For $i = 1 to $a1[0] Since you're now starting at 1, you can dispense with the "$i <> 0" test... Edit: Inside the loop, you'll be wanting to deal with the actual data elements of your array by referencing "$a1[$i]". Stick an "#Include <Array.au3>" at the top of your script, and an "ArrayDisplay($a1)" right after your StringSplit(). For debugging purposes, those two statements will give you a good idea at how your array is constructed, and what it contains. Hey Thanks , Working on it now, and that _ArrayDisplay helps alot tx ^^ Ill post my final version of this later today -Runner Link to comment Share on other sites More sharing options...
TheRunner Posted September 22, 2010 Author Share Posted September 22, 2010 (edited) Question I would like to save something that is hiding such as run(notepad.exe, @sw_hide) close and save notepad as test.txt but if its hiding it wont let me so far...is it not possible ? also if the name has a space like this Title: Registry Editor ControlSend("[Class:Registry Editor]","","","!N") -- my code atm, this won't press "no" How should it be? My idea atm is to have everything hidden, meaning they double click the exe and it does everything it needs to do without them seeing anything. If not then owell and life moves on lol Edited September 22, 2010 by TheRunner Link to comment Share on other sites More sharing options...
TheRunner Posted September 22, 2010 Author Share Posted September 22, 2010 (edited) Ok well here it is Mostly design for what I am doing but mb someone can have some use for it, any pointers though that could help the script out or do what I orginally wanted (everything hidden) that would rock. expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: The Runner Script Function: Remove oracle from registry then add new version to registry and update the environment variable #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #Include <Array.au3> dim $a1[25] dim $string = "" dim $regFile = "The Registry File Path and name of the file" dim $count = 0 $var = RegRead ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path") ; Path for environment variable ; Delete Oracle from Registry $Reg = RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Oracle") if $Reg = 1 Then MsgBox(0,"Delete","Oracle has been deleted") Else MsgBox(0,"Delete Failed", "Oracle does not exist") EndIf ; Put Oracle back in with correct version ; Shows the CMD Run("cmd.exe") WinWait("[CLASS:ConsoleWindowClass]") Send($regFile&"{ENTER}") sleep(1000) Send("!y") sleep(1000) send("{ENTER}") sleep(500) Send("Exit{ENTER}") sleep(1000) ; Get the string from the Registry Path then parse it (;) $a1 = StringSplit($var, ';', 1) for $j = 1 to $a1[0] $count = $count + 1 Next For $i = 1 to $a1[0] $results1 = StringInStr($a1[$i], "Possible version or what u wish to look for") $results2 = StringInStr($a1[$i], "ORACLE_9") $results3 = StringInStr($a1[$i], "ORACLE_8") if $results1 <> 0 Then $a1[$i] = "" ElseIf $results2 <> 0 Then $a1[$i] = "" ElseIf $results3 <> 0 Then $a1[$i] = "" Else $string = $string & $a1[$i] if $i <> $count Then $string = $string & ";" EndIf EndIf Next $file = FileOpen("file to open",0) ; what you want to add to the environment variable path. $data = FileReadLine($file) $string = $string & $data ; Add to your string FileClose($file) $result = RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "Path", "REG_EXPAND_SZ", $string) ; Add it If $result = 1 Then EnvUpdate() EndIf #cs ; Make sure you can connect to the oracle DB, that is if u have :) so this part is just commented out. Run("cmd.exe") sleep(500) Send("tnsping DB{enter}") sleep(500) Send("exit{ENTER}") #ce Edited September 22, 2010 by TheRunner Link to comment Share on other sites More sharing options...
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