XInFisk Posted July 7, 2007 Posted July 7, 2007 hey.. i got a little problem that i can't fix. I've tried to figure it out in one hour now... But i can't, that's why i ask here. I got this code: HotKeySet("{ENTER}", "sendcmd") $Cmd = GUICtrlCreateInput("", 1, 240, 616, 21, 0) Func sendcmd() If GUICtrlRead($cmd) = "" Then GUICtrlSetData($Console , GUICtrlRead($Console) & @CRLF & "Ops! You need to write something" & @CRLF) Else _ConsoleWrite(GUICtrlRead($Console) & @CRLF & GUICtrlRead($cmd)) _Done() GUICtrlSetData($cmd , "") EndIf EndFunc Func _Done() If GUICtrlRead($cmd) = "ClipPut" Then $ClipPut = ClipPut($ClipPutValue) _ConsoleWrite("Done! Clipboard is now: " & $ClipPutValue) EndIf EndFunc Okay.. I need to be able to write ex. ClipPut chickens in the water. and then it should set "Chikens in the water" to a variable called $ClipPutValue I hope someone can help me out. -XInFisk
rudi Posted July 8, 2007 Posted July 8, 2007 Hello. I'm a newbe myself. 1st I recognize, that I had to change "_consolewrite" to "consolewrite": Maybe your are not using the latest version? expandcollapse popupHotKeySet("{ENTER}", "sendcmd") $Cmd = GUICtrlCreateInput("", 1, 240, 616, 21, 0) Func sendcmd() If GUICtrlRead($cmd) = "" Then GUICtrlSetData($Console , GUICtrlRead($Console) & @CRLF & "Ops! You need to write something" & @CRLF) Else _ConsoleWrite(GUICtrlRead($Console) & @CRLF & GUICtrlRead($cmd)) _Done() GUICtrlSetData($cmd , "") EndIf EndFunc Func _Done() If GUICtrlRead($cmd) = "ClipPut" Then $ClipPut = ClipPut($ClipPutValue) _ConsoleWrite("Done! Clipboard is now: " & $ClipPutValue) EndIf EndFuncoÝ÷ Ûú®¢×¶Ö(¹×wº×hnz-ºÇ¿o*.®Ü(~éܶ*'±«¢+Ù!½Ñ-åMÐ ÅÕ½Ðíí9QIôÅÕ½Ðì°ÅÕ½Ðí͹µÅÕ½Ðì¤((ÀÌØí µôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°Ä°ÈÐÀ°ØÄذÈİÀ¤()չ͹µ ¤(í½±±ÁÍ)¹Õ¹()Õ¹}½¹ ¤(í½±±ÁÍ)¹Õ¹oÝ÷ ÛzÝ«ÞjZ(«mè^âà +k*Þj×jëh×6#include <GUIConstants.au3> GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateInput ( "", 10, 5, 300, 20) GUICtrlSetState(-1,$GUI_ACCEPTFILES) GUICtrlCreateInput ("", 10, 35, 300, 20) ; will not accept drag&drop files $btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelect Wend MsgBox (4096, "drag drop file", GUICtrlRead($file)) Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
rudi Posted July 8, 2007 Posted July 8, 2007 Hello. I'm a newbe myself. 1st I recognize, that I had to change "_consolewrite" to "consolewrite": Maybe your are not using the latest version? expandcollapse popupHotKeySet("{ENTER}", "sendcmd") $Cmd = GUICtrlCreateInput("", 1, 240, 616, 21, 0) Func sendcmd() If GUICtrlRead($cmd) = "" Then GUICtrlSetData($Console , GUICtrlRead($Console) & @CRLF & "Ops! You need to write something" & @CRLF) Else _ConsoleWrite(GUICtrlRead($Console) & @CRLF & GUICtrlRead($cmd)) _Done() GUICtrlSetData($cmd , "") EndIf EndFunc Func _Done() If GUICtrlRead($cmd) = "ClipPut" Then $ClipPut = ClipPut($ClipPutValue) _ConsoleWrite("Done! Clipboard is now: " & $ClipPutValue) EndIf EndFuncoÝ÷ Ûú®¢×¶Ö(¹×wº×hnz-ºÇ¿o*.®Ü(~éܶ*'±«¢+Ù!½Ñ-åMÐ ÅÕ½Ðíí9QIôÅÕ½Ðì°ÅÕ½Ðí͹µÅÕ½Ðì¤((ÀÌØí µôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°Ä°ÈÐÀ°ØÄذÈİÀ¤()չ͹µ ¤(í½±±ÁÍ)¹Õ¹()Õ¹}½¹ ¤(í½±±ÁÍ)¹Õ¹oÝ÷ ÛzÝ«ÞjZ(«mè^âà +k*Þj×jëh×6#include <GUIConstants.au3> GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateInput ( "", 10, 5, 300, 20) GUICtrlSetState(-1,$GUI_ACCEPTFILES) GUICtrlCreateInput ("", 10, 35, 300, 20) ; will not accept drag&drop files $btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20) GUISetState () $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelect Wend MsgBox (4096, "drag drop file", GUICtrlRead($file)) Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
XInFisk Posted July 8, 2007 Author Posted July 8, 2007 (edited) Sorry... I was really tired that night.. So i didn't really get it. Just one thing.. Please don't call me stupid in that way... it dosn't really help me. Btw. "_consolewrite" works just fine with my other code. ops.. i didn't write my whole script. Just needed help with storing the input from GuiCtrlCreateInput into more variables.. -XInFisk Edited July 8, 2007 by XInFisk
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