
ACalcutt
Active Members-
Posts
306 -
Joined
-
Last visited
Everything posted by ACalcutt
-
Serial Communication using kernel32.dll
ACalcutt replied to TABALtd's topic in AutoIt Example Scripts
Sorry to bring up a really old post, but i just thought I would share a fix if anyone is still using this. For a long time I've noticed the _OpenComm functions in my version of the UDF would not open above COM9. I finally decided to look into it and it seems to be that COM10 (and above) need a different syntax for the "CreateFile" dll call ( see https://support.microsoft.com/en-us/help/115831/howto-specify-serial-ports-larger-than-com9 ). COM1 - COM9 can be specified directly as "COM[PORT]" However COM10+ looks like they need to be formated "\\.\COM[PORT] " So in my code I have changed $hSerialPort = DllCall($commDll, "hwnd", "CreateFile", "str", "COM" & $CommPort, _ to $hSerialPort = DllCall($commDll, "hwnd", "CreateFile", "str", "\\.\COM" & $CommPort, _ Which seems to fix the ports COM10 and above (and still works with COM1-9) My current version is attached, but the fix above should work with other variations in this thread (looking i didn't see that anyone else had fixed it) cfxUDF.au3 -
set background color with _GUICtrlListView_InsertItem
ACalcutt replied to ACalcutt's topic in AutoIt General Help and Support
Thanks, that was what I was looking for :-) -
Is it possible to set a background color with _GUICtrlListView_InsertItem? I am creating a listview with "_GUICtrlListView_Create" and setting the background color with "_GUICtrlListView_SetBkColor". The background color gets set properly, but when I insert with "_GUICtrlListView_InsertItem" the background of the item is white instead of the background color I have set. Is there another command to change the background color of a listview item?
-
Windows Location API with autoit?
ACalcutt replied to ACalcutt's topic in AutoIt General Help and Support
These are a few I looked at, but they all seem to use built in .net libraries http://msdn.microsoft.com/en-us/library/system.device.location.geocoordinate(v=vs.110).aspx https://code.msdn.microsoft.com/Location-Aware-Navigation-43fbba4d http://blogs.msdn.com/b/gavingear/archive/2009/11/20/let-s-write-a-simple-net-4-location-aware-application.aspx http://msdn.microsoft.com/en-us/library/windows/apps/hh464926.aspx https://code.msdn.microsoft.com/windowsapps/Windows-7-Geolocation-API-25585fac -
I am looking for a way to access a internal gps sensor in a windows 8 tablet in my program Vistumbler. Right now my program uses com ports to connect to a gps, but these new sensors only seem to be available by the Windows Location API/Windows Sensor API. To use my program with the internal gps the only solution I have found is a pay product called "Centrafuse Localizer", which makes a virtual com port my program can connect to Has anyone found a way to use the internal sensor api with autoit? I'd like to find a way to access these sensors directly instead of having to use an extra pay product. So far the only examples i have found are written in .net. I'd imagine some type of dll that could be accessed by autoit could be created by someone with experience in that type of thing, but I wouldn't know where to start with that.
-
Serial Communication using kernel32.dll
ACalcutt replied to TABALtd's topic in AutoIt Example Scripts
Here is a slightly updated version of the cfxUDF.au3 I uploaded before. I had fixed some issues with constants to fix an error I was getting in my program. cfxUDF.au3 -
Has anybody had issues with _Zip_UnzipAll when "Hide extensions for known file types" is enabled in explorer? It was unzipping the files fine, but I kept getting the failure to extract error. I found out it was because the check if the file exists was returning 0 (this line) If FileExists($sDestPath & "\" & $oNS.Items.Item($oNS.Items.Count - 1).Name) Then From what i could see when you have "Hide extensions for known file types" enabled it only was returning "Uninstall" instead of "Uninstall.exe" To fix this temporarily I am getting the filename out out of the path instead (like this) $testfilesourcepath = $oNS.Items.Item($oNS.Items.Count - 1).path $testfiledestpath = $sDestPath & "\" & StringTrimLeft($testfilesourcepath, StringInStr($testfilesourcepath, "\" , 0 , -1)) If FileExists($testfiledestpath) Then
-
@SL1CeR Thanks for putting all the files and information in one place...I finally got this to work :-)
-
Thanks, that worked. I didn't need $WS_EX_CONTROLPARENT. I thought i had tried that...but i guess i didn't.
-
Is there a way to prevent a child gui from being moved by clicking and dragging it? In my vistumbler program i use a child gui to draw a graph of signal strength. In my latest version i noticed the graphic can now be clicked and dragged (something that the old version doesn't do) I striped out the basic layout for an example. #include <GuiConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1);Change to OnEvent mode Dim $ControlBackgroundColor = "0xD7E4C2" $Vistumbler = GUICreate("test gui", 980, 692, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $GraphicGUI = GUICreate("", 900, 400, 10, 60, $WS_CHILD, $WS_EX_CONTROLPARENT, $Vistumbler) GUISetBkColor($ControlBackgroundColor) GUISetState() GUISwitch($Vistumbler) GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit') While 1 Wend Func _Exit() Exit EndFunc The colored sqaure is my child gui that I use for my graph. If you left click anywhere in that colored area and drag it moves the child gui. I don't want the child gui to move unless I do it in the script. is there any way for me to change this action?
-
Is there an issue with this UDF in the latest version of autoit? I was using AutoIt v3.3.6.1 with my vistumbler application and noticed I was no longer getting APs when using native wifi. It seems like _Wlan_GetAvailableNetworkList was returning empty arrays (the array looked like it had 6 rows with no information). I switched back to AutoIt v3.3.0.0 (which was the last version I had used) and now everything seems to be working properly.
-
Does anyone know if it is possible to create a clickable link inside a listview? I am working on a geocaching program here (http://forum.techidiots.net/forum/viewtopic.php?f=37&t=423&start=50#p1724) which pulls in a geocache details url from gpx/loc files. I know I could make a button or menu item to open the url, but having a clickable link would be better
-
I used "Shell:Quick Launch" in the above script. "Shell:Quick Launch" is the same thing as "%appdata%\Microsoft\Internet Explorer\Quick Launch" (I learned that when I was trying to set my own taskbar back to normal) Everything was working in that script when I tested it last night. Mostly due to the code you wrote (I would have never thought to configure the taskbars the way you had done it). I've been on these forums for 4 years now(damn)...and i still learn something new every time I come here.
-
How about this....this worked for me ;------------------------------------------------------------------ ; AutoIt Version: 3.3.0.0 ; Author: Andrew Calcutt, wazer ; Last Edited: 09/12/2009 ; Script Function: Adds Quick Launch Toolbar ;------------------------------------------------------------------ ;Unlock Taskbar _ToggleTaskbarLock() ;Create Quicklaunch Toolbar _TaskToolbarWin7("Shell:Quick Launch") ;Get Quick Launch current postion While 1 Sleep(100) $QUICKLAUNCH = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; TEXT:Quick Launch]") If Not @error Then ExitLoop WEnd $TaskBar_CenterHeight = @DesktopHeight - ($QUICKLAUNCH[3] / 2) ;Hide "Quick Launch" toolbar text MouseClick("right", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, 1, 0) Send("x") ;Hide "Quick Launch" toolbar title MouseClick("right", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, 1, 0) Send("w") ;Move "Quick Launch" toolbar $QUICKLAUNCH = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ToolbarWindow32; TEXT:Quick Launch]") $TRAY = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:ReBarWindow32]") MouseClickDrag("left", $QUICKLAUNCH[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 5, $TaskBar_CenterHeight, 0) ;Move "Current Apps" bar $CURRENTAPPS = ControlGetPos("[CLASS:Shell_TrayWnd]", "", "[CLASS:MSTaskListWClass; TEXT:Running applications]") MouseClickDrag("left", $CURRENTAPPS[0] - 5, $TaskBar_CenterHeight, $TRAY[0] + 105, $TaskBar_CenterHeight, 0) ;Lock Taskbar _ToggleTaskbarLock() Func _TaskToolbarWin7($toolbardir) MouseClick("right", 0, @DesktopHeight) Send("{DOWN}{RIGHT}{UP}{ENTER}") WinWaitActive("New Toolbar") ControlSetText("New Toolbar", "", "Edit1", $toolbardir) ControlClick("New Toolbar", "", "Button1") EndFunc ;==>_TaskToolbarWin7 Func _ToggleTaskbarLock() MouseClick("right", 0, @DesktopHeight) Send("{UP}{UP}{ENTER}") EndFunc ;==>_ToggleTaskbarLock The only issue I had was getting the center height of the CURRENTAPPS bar. I ended up just using the the QUICKLANUCH center height. (I think my problem was cause by the taskbar squishing all my running programs to the point that there were multiple rows of programs)
-
How about this....this worked for me The only issue I had was getting the center height of the CURRENTAPPS bar. I ended up just using the the QUICKLANUCH center height. (I think my problem was cause by the taskbar squishing all my running programs to the point that there were multiple rows of programs)
-
This is based off an old function for my PrepSys program. It needed to be modified a little to work with windows 7 _TaskToolbarWin7("Shell:Quick Launch") Func _TaskToolbarWin7($toolbardir) ;----------------------------------------------------------------------------- ; AutoIt Version: 3.3.0.0 ; Author:Andrew Calcutt Date:09/12/2009 ; Script Function: Creates a toolbar in the taskbar (Windows 7 version) ;----------------------------------------------------------------------------- MouseClick("right", 0, @DesktopHeight) Send("{DOWN}{RIGHT}{UP}{ENTER}") WinWaitActive("New Toolbar") ControlSetText("New Toolbar", "", "Edit1", $toolbardir) ControlClick("New Toolbar", "", "Button1") EndFunc ;==>_TaskToolbar At the time I made the origional prepsys function I seem to remember trying to find a better way to do this but did not have much luck. I think you are going to have trouble getting the quick launch to look the way you want once it gets created. I had tried to do it by registry, but the toolbar key did not seem editable.
-
Embed XML SWF FusionChartsFree
ACalcutt replied to MartiniThePilot's topic in AutoIt Example Scripts
Looks good... Is there any way to tell the graph to re-read the xml file? -
What is the purpose of the script? Does it control google earth remotely?
-
Sorry to bring up an old topic, but does anyone have a good way to add a timeout to this function(_INetGetSource). I am working on something for my vistumbler program that may be used over a flakey internet connection. I was testing today and it took 12 seconds before timing out, which is way to long. I would like to set the timeout to something like 800ms. anybody have any suggestions? This is what I am working on --> http://forum.techidiots.net/forum/viewtopic.php?f=33&t=352
-
Does anyone have the code for this? The WiFi Locator.zip thats attached seems to be corrupt. I would be interested in a UDF...maybe creating one if necessary. I would like to integrate this into vistumbler.
-
Serial Communication using kernel32.dll
ACalcutt replied to TABALtd's topic in AutoIt Example Scripts
I started trying to make a UDF out of this. I am just trying to read gps data. This was my test script to read a line of data from the gps #include "cfxUDF.au3" Dim $CommPort = '4', $CommBaud = '4800', $CommBits = '8', $CommParity = '0', $CommStop = '0', $CommCtrl = '0011' $CommID = _opencomm($CommPort, $CommBaud, $CommBits, $CommParity, $CommStop, $CommCtrl) If $CommID <> "-1" Then ;While 1 $BufferData = _rxwait($CommID, 75, 800) ConsoleWrite($BufferData & @CRLF) ;WEnd _closecomm($CommID) EndIfcfxUDF.au3 -
I just want to add that this native wifi udf also seems to be compatible with vista And if anyone is interested, the vistumbler code with native wifi is here http://vistumbler.svn.sourceforge.net/view...DB/?pathrev=265 If you are using xp it will automatically use native wifi, but if you are using vista it needs to be enabled in the options menu
-
I am trying to use this UDF to give my vistumbler(vistumbler.net) some XP support. It seems to be working for the most part. I am able to get a list of access points. Is there any way to also get the BSSID, Channel and Radio type in the WlanGetAvailableNetworkList function?
-
The person using x64 says he did get a list of ports with the test script i sent him
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with:
-
I don't know... I'll see if i can find out
- 680 replies
-
- serial port
- virtual port
-
(and 2 more)
Tagged with: