sno Posted June 2, 2005 Share Posted June 2, 2005 Still i have two questions more: 1. I want to set environment in a permanent way so that it is available in a later user session for other programs to use. What is the best way of doing so? 2. is there a debug,print,println option to send text to de command box, andso why cant i find it in the help or beter wat are my alternatives? CallDll() ? thx in advance Grtx Sno. The Novice Newbie. Link to comment Share on other sites More sharing options...
sno Posted June 2, 2005 Author Share Posted June 2, 2005 isn t this suppose to be a simple question, somebody? Grtx Sno. The Novice Newbie. Link to comment Share on other sites More sharing options...
SumTingWong Posted June 2, 2005 Share Posted June 2, 2005 (edited) Still i have two questions more:1. I want to set environment in a permanent way so that it is available in a later user session for other programs to use. What is the best way of doing so?2. is there a debug,print,println option to send text to de command box, andso why cant i find it in the help or beter wat are my alternatives? CallDll() ?thx in advance<{POST_SNAPBACK}>1. On NT/2000/XP, RegWrite your variables to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and then call EnvUpdate() to activate the changes2. Use Scite and ConsoleWrite Edited June 2, 2005 by SumTingWong Link to comment Share on other sites More sharing options...
sno Posted June 2, 2005 Author Share Posted June 2, 2005 1. On NT/2000/XP, RegWrite your variables to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and then call EnvUpdate() to activate the changes2. Use Scite and ConsoleWrite<{POST_SNAPBACK}>2. ConsoleWrite() help -> "This does not write to a DOS console", But i do want to write to the dos console. Grtx Sno. The Novice Newbie. Link to comment Share on other sites More sharing options...
ShelbySue Posted June 2, 2005 Share Posted June 2, 2005 In writing to the dos command line. Are you attempting to execute some commands? Intereact with a running program? Or just look at some raw output? Let me know, each has it's own solution. To write to the DOS command window would yield invalid command errors if you are just trying to list text. You can do a send to send the characters to the dos window, but - again - this won't yield what you are expecting - I think. To list text while you watch for program testing - the consolewrite is the best solution. Otherwise, store your output to a text file and call notepad file.txt to display the output. If you are attempting to monitor progress, you could create a multiline edit control and just send the text to the control. It would autoscroll. ;#region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 316,(@DesktopWidth-392)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Button_1 = GuiCtrlCreateButton("Simulate Input", 2, 2, 100, 40) $Input_1 = GuiCtrlCreateEdit("Input1", 45, 45, 300, 240) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop case $msg = $Button_1 GUICtrlsetdata($Input_1,GUICtrlRead($Input_1) & @CRLF & "CURRENT TIME : " & @hour & ":" & @MIN & ":" & @SEC ) Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Link to comment Share on other sites More sharing options...
itjf Posted April 28, 2006 Share Posted April 28, 2006 Still i have two questions more:1. I want to set environment in a permanent way so that it is available in a later user session for other programs to use. What is the best way of doing so?AutoIT-script "SendValue.exe" containing:Console(@ProgramFilesDir)DOS batchfile:For /F "Tokens=*" %%a in ('"SendValue.exe"') Do Set EnvValue=%%aEcho %EnvValue%Best RegardsJan Fredsholt 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