-
Posts
436 -
Joined
-
Last visited
Everything posted by JoHanatCent
-
@ad777 - Thank you for all your efforts. I'll rather not do the last suggested changes. It looks a bit extreme for my problem. Besides I may want to use Edge from time to time ; > @Werty - Yes I did that setting. But Edge sometimes just takes over any way. So I'm back to my initial Tab and send keys. Ckecking with Assoc .pdf every hour. Then only run the correction.
-
I found this in your registry address. Deleted the MSEdgePDF entry. It did delete. Restarted the PC. That entry was no longer in the registry. BUT Edge still open the PDF files. Again right click on the file. Changed to Acrobat. Everything works with Acrobat. Also checked the file assoc and FType they changed to Acrobat. It was about two hours later and Edge is back! I don't even use Edge as a browser. I'm using Chrome. (I even did some recommended changes in Edge to stop it. Not working!!!!!)
-
Sorry it is not working. Checked if registry entries worked - it did. Checked if Assoc changed - it did. Checked if Ftype changed = it did. Edge still open pdf files. <<< Very frustrating! Right clicked on a pdf file and changed to Adobe - it worked. Adobe opened the PDF files. <<< Very happy But 12 hours later it is all back to Edge !!! (No restart no updates nothing just like magic)
-
It all looks familiar. So I tried in your order as described above. See attached result. I also checked assoc and ftype. They show indeed acrobat. BUT Edge still open pdf files! #RequireAdmin $DosCMD = 'Assoc .pdf=pdffile' $DosCMD2 = 'Ftype pdffile=C:\Program Files\Adobe\Acrobat DC\Acrobat.exe %*';you might want to change path to the folder of Acrobat.exe RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show) RunWait(@ComSpec & ' /C ' & $DosCMD2, '', @SW_Show) sleep(2000) RunWait(@ComSpec & ' /C ' & 'd:\temp\run.bat', @SW_Show) sleep(2000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList","z","REG_SZ","C:\Program Files\Adobe\Acrobat DC\Acrobat.exe") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList","MRUList","REG_SZ","z") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithProgids","pdffile","REG_BINARY","") sleep(5000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice","Progid","REG_SZ","pdffile")
-
Done that. See first post. It does change when one check BUT Edge is still opening the pdf file. There are also no policies set.
-
Still stuck. Tried this as well: $iPID = Run("explorer.exe /select, d:\temp\tow.pdf");Any pdf file should do Sleep(500) Send("{SHIFTDOWN}") Sleep(500) Send("{f10}") Sleep(500) Send("o") Sleep(500) Send("c") Send("{SHIFTUP}") Sleep(1500) $A = ProcessClose($iPID) Sleep(500)
-
I'm trying to make it easier to set Acrobat as default for .pdf files. None of these helps because it just keeps on opening with Edge. Tried assoc, ftype, xml setting and even registry settings. The only way is to go to file settings and manually change it. This is what I have so far but would like to do the whole thing without using TAB's $DosCMD = 'start ms-settings:defaultapps' RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show)
-
Yes
-
SOLVED - Transparent GUI Object
JoHanatCent replied to Siwa's topic in AutoIt General Help and Support
Have you tried: GUICtrlCreateDate with example in help? -
Cannot Minimize 'Magnifier'
JoHanatCent replied to zeenmakr's topic in AutoIt General Help and Support
Use Run RunWait will "pauses script execution until the program finishes." -
[Solved] Create borders around excel range
JoHanatCent replied to AnonymousX's topic in AutoIt General Help and Support
You can try $oExcel.ActiveSheet.range("F2:G3").BorderAround(1) -
_Excel_RangeWrite - Worksheet object? - (Moved)
JoHanatCent replied to rawmud's topic in AutoIt General Help and Support
Can you provide an example of your notepad files? I will be a lot easier to use FileReadToArray and the write to the exel file? -
Do _Excel_Open once Then the WorkBooks. Don't need to switch Windows to get the values: #include <Excel.au3> Local $oExcel = _Excel_Open() ;Open Test1 Excel Workbook Local $ofile = @ScriptDir & "\test1.xlsx" Local $oWorkbook = _Excel_BookOpen($oExcel, $ofile) ;Open Test2 Excel Workbook Local $mfile = @ScriptDir & "\test2.xlsx" Local $mWorkbook = _Excel_BookOpen($oExcel, $mfile) ;Read Workbook data and display Local $read1 = _Excel_RangeRead($oWorkbook, Default, "B2") ; Cell B1 in Test1 workbook contains the word Test1 Local $read2 = _Excel_RangeRead($mWorkbook, Default, "B2") ; Cell B1 in Test2 workbook contains the word Test2 MsgBox(0, 0, $read1 & @CR & $read2) ;Returns the correct values.
-
Remove figure from the open workbook Excel
JoHanatCent replied to LazyVasily's topic in AutoIt General Help and Support
* Delete the part belonging to _Excel_BookOpen. * Put the title of the Excel window in $sWorkBook = * Use _Excel_BookAttach($sWorkbook, "Title") Working just as well. -
Remove figure from the open workbook Excel
JoHanatCent replied to LazyVasily's topic in AutoIt General Help and Support
@Lazy Why do you write about "filename" ? This is as used in _Excel_BookAttach. Look at the help example. Tested and working as requested: #include <Excel.au3> #include <MsgBoxConstants.au3> Local $sWorkBook = "1.xls" Local $oExcel = _Excel_Open() If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error creating Excel object! @error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\1.xls") If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_BookAttach Example", "Error opening workbook '" & @ScriptDir & "\1.xls'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oExcel) Exit EndIf Local $oWorkBook = _Excel_BookAttach($sWorkbook, "filename") If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error attaching to the workbook! @error = " & @error & ", @extended = " & @extended) $oWorkBook.ActiveSheet.Shapes.Range("Oval 1").Delete If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error deleting shape! @error = " & @error & ", @extended = " & @extended) -
Remove figure from the open workbook Excel
JoHanatCent replied to LazyVasily's topic in AutoIt General Help and Support
Try $oExcel = _Excel_Open() $o_Excel = _Excel_BookOpen($oExcel, @DesktopDir & "\Book 1.xls") $o_Excel.ActiveSheet.Shapes.Range(("Oval 1")).Delete _Excel_BookClose($o_Excel) -
Call Func located in .txt doc
JoHanatCent replied to HankHell's topic in AutoIt General Help and Support
The #include can also be text file like: #include "C:\location\testread.txt" -
MSPaint connecting dots.
JoHanatCent replied to StudentJack's topic in AutoIt General Help and Support
" .. how can I make it search for dots from Left to Right after script finished searching from right to left? .." You can change this : While $count < 1187 to While 0. The counter then needs to be changed to minus when going over 1187 until you get back to less than 8. As soon as it gets to 8 change the counter to positive again? -
MSPaint connecting dots.
JoHanatCent replied to StudentJack's topic in AutoIt General Help and Support
Try searching from left to right? Global $Paused HotKeySet('{Insert}', 'TogglePause') WinActivate("dots - Paint") $dot = 1 $count = 1 While $count < 1187 $dot = PixelSearch(8 + $count, 146, 8 + $count, 613, 0x000000) If Not @error Then MouseMove($dot[0], $dot[1], 50) MouseClick("Left", $dot[0], $dot[1], 1, 10) EndIf $count = $count + 4 WEnd Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) WEnd EndFunc ;==>TogglePause -
Replace Values In Excel
JoHanatCent replied to jbsoccerbrit's topic in AutoIt General Help and Support
Did you try the Excel Management part in help? -
FORMAT NUMBER WHILE PRINTING TO A TEXT FILE
JoHanatCent replied to Rskm's topic in AutoIt General Help and Support
Yes I saw the 7 and also your comment on 8 columns. But any way, an even more convoluted approach? Local $aPis = [ _ - 314.15926, _ - 31.415926, _ - 3.1415926, _ - 0.31415926, _ - 0.031415926, _ - 0.0031415926, _ - 0.00031415926, _ - 0.000031415926, _ 0.000031415926, _ 0.00031415926, _ 0.0031415926, _ 0.031415926, _ 0.31415926, _ 3.1415926, _ 31.415926, _ 314.15926, _ 3141.5926, _ - 1234, _ - 123, _ - 12, _ - 1, _ 1, _ 12, _ 123, _ 1234, _ 12345 _ ] For $f In $aPis If Round($f, 2) = 0 Then ConsoleWrite("00000.00" & @LF) Else ConsoleWrite(StringFormat("%05d", $f) & StringRight(StringFormat("%.2f", $F), 3) & @LF) EndIf Next -
FORMAT NUMBER WHILE PRINTING TO A TEXT FILE
JoHanatCent replied to Rskm's topic in AutoIt General Help and Support
Depending what Rskm wants in his text file? Local $aPis = [ _ - 314.15926, _ - 31.415926, _ - 3.1415926, _ - 0.31415926, _ - 0.031415926, _ - 0.0031415926, _ - 0.00031415926, _ - 0.000031415926, _ 0.000031415926, _ 0.00031415926, _ 0.0031415926, _ 0.031415926, _ 0.31415926, _ 3.1415926, _ 31.415926, _ 314.15926, _ 3141.5926 _ ] For $f In $aPis If Round($f, 2) = 0 Then ConsoleWrite("00000.00" & @lf) Else ConsoleWrite(StringFormat("%05d", $f) & StringRight(Round($f - Int($f), 2), 3) & @LF) EndIf Next -
Run batch file with elevated privileges
JoHanatCent replied to ckth26's topic in AutoIt General Help and Support
Maybe do everything in your script.cmd with autoit? -
FORMAT NUMBER WHILE PRINTING TO A TEXT FILE
JoHanatCent replied to Rskm's topic in AutoIt General Help and Support
It looks pretty good If you us an if to solve the Zero answers? -
FORMAT NUMBER WHILE PRINTING TO A TEXT FILE
JoHanatCent replied to Rskm's topic in AutoIt General Help and Support
You can combine the result. Something like this? $Start= 1234.5656565 MsgBox(4096,"",StringFormat("%05d", $Start ) & stringright(round($start - int($Start),2),3))