Jump to content

Logty

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Logty

  1. One quick question about your script, what is variable $sNumber?
  2. Here, try this #Include <String.au3> $CmdStr = $CmdLineRaw $ParsedStr = StringSplit($CmdStr, " ") If $ParsedStr[0] > 1 Then For $i = 1 To $ParsedStr[0] ConsoleWrite($ParsedStr[$i] & @LF) Next EndIf Is that what you were looking for?
  3. Which UDF? do you mean the Serial Port communications one? also, could you post a small example code?Thanks!!
  4. Cool! I will try it later, are there any other options though?
  5. Is there any way to call a phone number without using the skype UDF though? Like isn't there a dll or something you could use?
  6. Is there any way in autoit3 to call a phone number from your computer, kind of like skype? I know there probably is, but I have been having a difficult time finding out how.
  7. Thanks! This is Awesome! I have seen this command before, but I never realized what it could be used to do!
  8. Thats a great idea! Thanks! I have seen some things, but they are so complicated that I didn't want to get lost
  9. Is there any way to have a program that receives variables from another program? Like lets say you have a game in which you have two programs that run it, one main one that generates the graphics and a secondary one that does all of the calculations and sends those variables to the first one for the graphics. Is there any way to do this simply? Thanks!
  10. Here is how you do it, it is fairly simple: HotKeySet( "x", "k" ) While 1 Sleep( 10 ) WEnd Func k() Exit EndFunc What it does is it goes through the script until x is pressed and then it goes to function k(). If you want to use special keys like escape then you have to type something like: HotKeySet( "{esc}", "k" ) While 1 Sleep( 10 ) WEnd Func k() Exit EndFunc
  11. Yes, I just want to be able to send a string or maybe some numbers from one program to another, is there any way of doing that?
  12. How can I use ConsoleRead so that it reads data outputted by another program? Can I have two programs like : While 1 ConsoleWrite( "hello" ) Sleep( 10 ) WEnd and GUICreate( "" ) $m = GUICtrlCreateLabel( "", 10, 10 , 500, 300 ) GUICtrlSetFont( -1, 20 ) GUISetState() While 1 GUICtrlSetData( $m, ConsoleRead()) Sleep( 10 ) WEnd
  13. I was having some trouble with this code because I am trying to get gluLookAt() (for those of you who are familiar with opengl) to work, but for some reason my script freezes up every time I run it, does anybody know how to fix this problem? Global Const $GL_VERSION_1_1 = 1 Global Const $PFD_TYPE_RGBA = 0 Global Const $PFD_MAIN_PLANE = 0 Global Const $PFD_DOUBLEBUFFER = 1 Global Const $PFD_DRAW_TO_WINDOW = 4 Global Const $PFD_SUPPORT_OPENGL = 32 Global Const $GL_PROJECTION = 0x1701 Global Const $GL_COLOR_BUFFER_BIT = 0x00004000 Global Const $GL_TRIANGLES = 0x0004 Global $gui = GUICreate("OpenGL", 250, 250) GUISetBkColor(0x000000) Global $dc EnableOpenGL($gui, $dc) ;glMatrixMode($GL_PROJECTION) ;glViewport(0, 0, 250, 250) GUISetState(@SW_SHOW) While GUIGetMsg() <> -3 glClear($GL_COLOR_BUFFER_BIT) glBegin($GL_TRIANGLES) glColor3f(0, 1, 0) glVertex3f(-.75, -.5, 0) glColor3f(1, 0, 0) glVertex3f(0, .75, 0) glColor3f(0, 0, 1) glVertex3f( .75, -.5, 0) glEnd() SwapBuffers($dc) glMatrixMode("GL_PROJECTION" ) glLoadIdentity() gluPerspective(10.0, 1.0, 0.0, 60.0) glMatrixMode( "GL_MODELVIEW" ) glLoadIdentity() gluLookAt( 1.0, 1.0,1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ) WEnd Func EnableOpenGL($hwnd, ByRef $hDC) Local $pfd = DllStructCreate("short nSize;" & _ "short nVersion;" & _ "dword dwFlags;" & _ "byte iPixelType;" & _ "byte cColorBits;" & _ "byte cRedBits;" & _ "byte cRedShift;" & _ "byte cGreenBits;" & _ "byte cGreenShift;" & _ "byte cBlueBits;" & _ "byte cBlueShift;" & _ "byte cAlphaBits;" & _ "byte cAlphaShift;" & _ "byte cAccumBits;" & _ "byte cAccumRedBits;" & _ "byte cAccumGreenBits;" & _ "byte cAccumBlueBits;" & _ "byte cAccumAlphaBits;" & _ "byte cDepthBits;" & _ "byte cStencilBits;" & _ "byte cAuxBuffers;" & _ "byte iLayerType;" & _ "byte bReserved;" & _ "dword dwLayerMask;" & _ "dword dwVisibleMask;" & _ "dword dwDamageMask;") Local $h_dc = DllCall("user32.dll", "hwnd", "GetDC", "hwnd", $hwnd) DllStructSetData($pfd, "nSize", DllStructGetSize($pfd)) DllStructSetData($pfd, "nVersion", $GL_VERSION_1_1) DllStructSetData($pfd, "dwFlags", BitOR($PFD_DRAW_TO_WINDOW, $PFD_SUPPORT_OPENGL, $PFD_DOUBLEBUFFER)) DllStructSetData($pfd, "iPixelType", $PFD_TYPE_RGBA) DllStructSetData($pfd, "cColorBits", 24) DllStructSetData($pfd, "cDepthBits", 16) DllStructSetData($pfd, "iLayerType", $PFD_MAIN_PLANE) DllOpen("gdi32.dll") DllOpen("opengl32.dll") DllOpen( "Glu32.dll" ) Local $iFormat = DllCall("gdi32.dll", "int", "ChoosePixelFormat", "hwnd", $h_dc[0], "ptr", DllStructGetPtr($pfd)) Local $iSetFormat = DllCall("gdi32.dll", "int", "SetPixelFormat", "hwnd", $h_dc[0], "int", $iFormat[0], "ptr", DllStructGetPtr($pfd)) Local $h_cont = DllCall("opengl32.dll", "hwnd", "wglCreateContext", "hwnd", $h_dc[0]) Local $iRet = DllCall("opengl32.dll", "int", "wglMakeCurrent", "int", $h_dc[0], "int", $h_cont[0]) $hDC = $h_dc[0] Return 1 ; absolutley no error checking at this moment EndFunc ;==>EnableOpenGL Func glBegin($mode) DllCall("opengl32.dll", "none", "glBegin", "uint", $mode) EndFunc ;==>glBegin Func glClear($mask) DllCall("opengl32.dll", "none", "glClear", "uint", $mask) EndFunc ;==>glClear Func glColor3f($red, $green, $blue) DllCall("opengl32.dll", "none", "glColor3f", "float", $red, "float", $green, "float", $blue) EndFunc ;==>glColor3f Func glEnd() DllCall("opengl32.dll", "none", "glEnd") EndFunc ;==>glEnd Func glLoadIdentity() DllCall("opengl32.dll", "none", "glLoadIdentity") EndFunc ;==>_glLoadIdentity Func gluLookAt($x1, $y1, $z1,$x2, $y2, $z2, $0, $1, $00) DllCall( "Glu32.dll", "none", "gluLookAt", "float", $x1,"float", $y1,"float", $z1,"float", $x2,"float", $y2,"float", $z2, "float" , $0, "float", $1, "float", $00 ) Endfunc Func gluPerspective($n1, $n2, $f1,$f2) DllCall( "Glu32.dll", "none", "gluPerspective", "float", $n1,"float", $n2,"float", $f1,"float", $f2) Endfunc Func glMatrixMode($mode) DllCall("opengl32.dll", "none", "glMatrixMode", "uint", $mode) EndFunc ;==>glMatrixMode Func glVertex3f($x, $y, $z) DllCall("opengl32.dll", "none", "glVertex3f", "float", $x, "float", $y, "float", $z) EndFunc ;==>glVertex3f Func glViewport($x, $y, $width, $height) DllCall("opengl32.dll", "none", "glViewport", "int", $x, "int", $y, "int", $width, "int", $height) EndFunc ;==>glViewport Func SwapBuffers($hDC) DllCall("gdi32.dll", "int", "SwapBuffers", "hwnd", $hDC) EndFunc ;==>SwapBuffers If you take out the gluLookAt and gluPerspective the script runs perfectly fine
×
×
  • Create New...