Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. I'm looking for help This is the s.t.a.l.k.e.r sdk level editor I have two windows open Object List and Object Inspector what I need is a macro or batch script to write to a txt file. name, position, rotation, scale for each object in the Object List Object Inspector updates when selecting a scene object. I run Au3Info.exe The only time I could retrieve visible text is when I open The XYZ value edit window. (This Is for the X Spinner) Class: TMultiObjSpinEdit Instance: 3 ClassnameNN: TMultiObjSpinEdit3 Name: Advanced (Class): [CLASS:TMultiObjSpinEdit; INSTANCE:3] (This Is for the Y Spinner) ClassnameNN: TMultiObjSpinEdit2 Name: Advanced (Class): [CLASS:TMultiObjSpinEdit; INSTANCE:2] (This Is for the Z Spinner) ClassnameNN: TMultiObjSpinEdit1 Name: Advanced (Class): [CLASS:TMultiObjSpinEdit; INSTANCE:1]
  3. It is working fine on my comp. Make sure you got the most recent version of autoit, fully installed with the autoit installer. Look in the include folder for that specific file. It is quite a basic script.
  4. Nine, I cannot run this script. Writes "#include <WinAPISysWin.au3> Error opening the file". #include <APISysConstants.au3> #include <WinAPISysWin.au3> Opt('TrayAutoPause', 0) OnAutoItExitRegister('OnAutoItExit') Global $g_hForm = GUICreate('') GUIRegisterMsg(_WinAPI_RegisterWindowMessage('SHELLHOOK'), 'WM_SHELLHOOK') _WinAPI_RegisterShellHookWindow($g_hForm) While 1 Sleep(1000) WEnd Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg Switch $hWnd Case $g_hForm Local $sTitle = WinGetTitle($lParam) Switch $wParam Case $HSHELL_FLASH If IsString($sTitle) Then ConsoleWrite('Redrawn: ' & $sTitle & @CRLF) EndIf Case Else If BitAND($wParam, $HSHELL_WINDOWACTIVATED) = $HSHELL_WINDOWACTIVATED And IsString($sTitle) Then ConsoleWrite('Activated: ' & $sTitle & @CRLF) EndIf EndSwitch EndSwitch EndFunc ;==>WM_SHELLHOOK Func OnAutoItExit() _WinAPI_DeregisterShellHookWindow($g_hForm) EndFunc ;==>OnAutoItExit
  5. I think the target is not the problem as the mousedown and up are registering for that i am just using the window title and offsetting the coordinates by 2 & 30px. for some reason it just seams to not be registering the mousemove commands,
  6. If you get it from an input, maybe you can force a trailing backslash. "something.csv\" is a folder
  7. Today
  8. @jchd okay, thanks for the advice. i will keep that in mind and try to come up with something better. but for testing it worked here on this computer.
  9. Use the example here. Replace the message $HSHELL_REDRAW by $HSHELL_FLASH. You are done...
  10. Nine, I only found this link by _WinAPI_RegisterShellHookWindow() : https://www.autoitscript.com/trac/autoit/ticket/2910 What to do next ? Where to add $HSHELL_FLASH ?
  11. Beware that .zzz might already exist. Prefer a "most probably unique" extension, (you aren't limited to 3-char legacy and you can use many dots), like ".zzz.MyOwn.Ext.For.Easy.Printing"
  12. Ah, you mean you want to differenciate whether the user wants to create a folder or a file with the input (s)he supplies you? In short: read his/her mind? That's the same difference between buying raw goods and cooking a meal, or for a doctor to prescribe some rest or brain surgery. Leave the user the clear choice: A/ I want to create a folder (cooking, surgery) B/ I want a new file (goods, rest) That leaves open the creation of files without extension (something perfectly legitimate) and folder having one or more dots (also completely valid).
  13. yes i can just prohibit the point in the last element of the path or filter it as proposed by AdamUL thanks to all 😉
  14. hi, after looking at a list of file extensions on the web, i decided to test the extension *.zzz (it does not seem to be used at the moment by any other program) and did a lot of testing with the registry and have come up with following solution: Case $print Global $tempfile = "zprint.zzz" RegWrite("HKEY_CLASSES_ROOT\.zzz", "", "REG_SZ", "zzzfile") RegWrite("HKEY_CLASSES_ROOT\.zzz", "Content Type", "REG_SZ", "text/plain") RegWrite("HKEY_CLASSES_ROOT\.zzz", "Perceived Type", "REG_SZ", "text") RegWrite("HKEY_CLASSES_ROOT\zzzfile", "", "REG_SZ", "Text Document") RegWrite("HKEY_CLASSES_ROOT\zzzfile\shell", "", "REG_SZ", "") RegWrite("HKEY_CLASSES_ROOT\zzzfile\shell\print", "", "REG_SZ", "") RegWrite("HKEY_CLASSES_ROOT\zzzfile\shell\print\command", "", "REG_EXPAND_SZ", "%SystemRoot%\system32\NOTEPAD.EXE /p %1") Sleep(500) $PrintData = GUICtrlRead($text) FileWrite ($tempfile, $PrintData) _FilePrint($tempfile) Sleep(500) RegDelete("HKEY_CLASSES_ROOT\.zzz") RegDelete("HKEY_CLASSES_ROOT\zzzfile") FileDelete ($tempfile) now this code above works like it should but: i am now missing the possibility of choice which printer should be used. currently it uses the default printer and that is super but using a typical print dialog (dialogue) would be nice and strangely the helpfile(s) for _WinAPI_PrintDlg and _WinAPI_PrintDlgEx are both more like an overkill because it is showing off what it can do, whilst when i print from notepad2.exe i get the _WinAPI_PrintDlgEx version but with the "Everything" Radiobutton activated and 1 Copy only. i know i can edit the example still a bit, but currently it is not quite clear to me how to implement above code into a printing dialog. any ideas?
  15. thanks jchd but that does not answer the initial question of how to distinguish a file path from a folder path before creating it
  16. @ericire Wrong answer! Local $aPath = [@ScriptName, ".", "C:\", "H:\MyFolder.special.version"] For $s In $aPath _WhatIsPath($s) Next Func _WhatIsPath($sPath) Local $ret = FileGetAttrib($sPath) ConsoleWrite('"' & $ret & '"' & @CRLF) Select Case $ret = "" MsgBox(0, "Result", $sPath & " doesn't exist yet." & @LF & "It *may be* OK to create that directory.") Case StringInStr($ret, "D") MsgBox(0, "Result", $sPath & " is already a directory with attributes " & $ret & @LF & "No need to create it.") Case Else MsgBox(0, "Result", $sPath & " is an existing file with attributes " & $ret & @LF & "Can't create a directory with this name.") EndSelect EndFunc I wonder if you ever read the answer you got here.
  17. An Isfile or isdirectory function would not matter as a dot is a valid character in a directory name. If you are just worried about "extensions," then you can do something like this. This will work with a path with an "extension" or not. Global $sDir = "Dir1\Dir2\Dir.csv" $sDir = StringRegExpReplace($sDir, "\.[^.]*$", "") If Not DirCreate($sDir) Then Exit 1 Adam
  18. There are plenty of examples that I pointed you to where you let the software run for X days and then only provide the serial when it is paid for. But based on your other comments you are not going to be happy until someone spoon feeds it all to you. With this show of laziness, I cringe to think at the quality of your application.
  19. so I only have the solution to use stringRight() and verify if there is a dot good evening
  20. Hi BrewManNH yes, damage that there is no function isfile or isdirectory
  21. Try this and adapt: HotKeySet("{ESC}", _Terminate) Local $title = "Adelitas Way - What It Takes" & " here more long text, much larger than LCD 24-char display (example) ... " Local $max = 24 Local $str = $title & $title ; yes, concat two copies of text Local $i While 1 $i += 1 ConsoleWrite(StringMid($str, Mod($i, StringLen($title)), $max) & @CRLF) Sleep(200) WEnd Func _Terminate() Exit EndFunc
  22. Hi AdamUl the problem is that dircreate will inevitably create a folder named Dir.csv
  23. This "WiFi_Configuration Ver 3.6" is a valid directory name, and a real one on my computer. This isn't a file, and there's no way you're going to be able to differentiate between a file name and a directory name using a criteria of "if it has a dot and something after it, it's a file name"
  24. A directory name with a dot in it is a valid path. DirCreate will not create a file, only a directories. See the example below. No file is created. Global $sDir = "Dir1\Dir2\Dir.csv" ;Dir.csv is a directory, not a file. If Not DirCreate($sDir) Then Exit 1 Now if you want to restrict directory names, more so than Windows, that is another thing. Adam
  1. Load more activity
  • Create New...