Jump to content

remin

Active Members
  • Posts

    116
  • Joined

  • Last visited

remin's Achievements

Adventurer

Adventurer (3/7)

4

Reputation

  1. Thank you. I use it in all programs. Never had any problem before. Yesterday I added sleep() before an after the send command and it worked again but not in Wordpad. Not a problem. Thank you for your help. Have a nice day.
  2. I tested with WordPad
  3. Thanks. If the formatted text is underlined the pasted text will start with an empty underline character.
  4. Please find in attachment the script.clipb_remove_formatting.au3 _Clipboard.au3
  5. Thanks for your answer. I tried this, but nothing changes. I don't understand what's going on. The script doesn't work anymore (without me changing anything).
  6. It captures the clipboard text, removes the formatting and paste it in the text. Please see the comments tags after the code in above function.
  7. Yes I tried it. Strange things are happening now: If I copy a formatted text and put the cursor a line below the formatted text and use the hotkey Ctrl-g the formatting is removed. If I put the cursor after the formatted text and use the same hotkey the formatting is not removed.
  8. I use this function since many many years (hotkey: ctrl-g). Func _ClearAndPaste() ; CTRL+g ; serve _Clipboard.au3 in include Local $aClip _Clipboard_GetAll($aClip) ; save clipboard contents Local $sClip = ClipGet() ; get clipboard as plain text ClipPut($sClip) ; put clear text back on clipboard Send("^v") ; paste it _Clipboard_PutAll($aClip) ; restore previous contents (clears current contents) _Clipboard_MemFree($aClip) EndFunc It does not work anymore. It just paste the Rich text. Has anything changed in windows as far as the clipboard is concerned? ps: I did not change autoit version. Still the same as before (3.3.14.5)
  9. Thank you, I think that's a lot of work. I do have 29 functions in my script file (not all with a while loop). Maybe it's easier to refuse 2 Gui's at the same time. Is it possible to close all open Autoit Gui's before to create the current Gui?
  10. I do have one autoit script file with multiple functions. p.e. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <String.au3> #include <GuiButton.au3> #include <Constants.au3> #include <EditConstants.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> #include <HotString.au3> Func ACase() $Form4=GUICreate("ACase", 100, 195, 290, 142) etc etc GUISetState(@SW_SHOW, $Form4) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE SUB_Write2ini(....) ;I write a few things in an ini file Case $a Case $b etc EndSwitch WEnd EndFunc Func BCase() $Form5=GUICreate("BCase", 100, 195, 290, 142) etc etc GUISetState(@SW_SHOW, $Form5) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE SUB_Write2ini(....) ;I write a few things in an ini file Case $a Case $b etc EndSwitch WEnd EndFunc When I activate the 1st function (ACase), using a shortcut and the 2nd function (BCase) (with a different shortcut) and I click on a button in whatever of these 2 Gui's, I can't use the other Gui anymore. It doesn't do the right thing as if autoit only remembers the Gui I first used. What did I wrong? How can I let autoit know which GUI is active and to connect to the function of that Gui? Hope I made myself clear.
  11. I was wondering if it is possible to copy also a link text with autoit? I use a Copy Link Text plugin in my chrome and in my firefox browser. (right click on link --> "Copy Link Text") Would be much easier if I could do it using autoit.
  12. Hi Kylomas, Please see post#12 ps: Agree that there are many different editors. I'm sure I need more than one backup script in the future
  13. I want to create backups not only for word files, that's why I stick to autoit But.. Again this error: Local SmyDocName = StringRegExp($oDoc.Name, ".*(?=\.[a-zA-Z0-9]*$)", 1) Local SmyDocName = StringRegExp(SoDoc^ ERROR Error: Variable must be of type "Object" Can't find the solution. any idea?
  14. #include <Word.au3> HotKeySet("!5", "_BkpWordDoc") Func _BkpWordDoc() Global $oWord = _Word_Create() Global $oDoc = _Word_DocGet($oWord, 1) Local $myDocName = StringRegExp($oDoc.Name, ".*(?=\.[a-zA-Z0-9]*$)", 1) Local $myDocExt = StringRegExp($oDoc.Name, "\.[a-zA-Z0-9]*$", 1) Local $filetime = FileGetTime($oDoc.FullName, 0, 0) ;backup using modified time FileCopy($oDoc.FullName, "d:\bkp_" & $myDocName[0] & "_" & $filetime[0] & "-" & $filetime[1] & "-" & $filetime[2] & "_" & $filetime[3] & "-" & $filetime[4] & $myDocExt[0], 1) EndFunc Once in a while I receive this error: Local SmyDocName = StringRegExp($oDoc.Name, ".*(?=.[a-zA-Z0-9]*$)", 1) Local SmyDocName = StringRegExp(SoDoc^ ERROR Error: Variable must be of type "Object" Does anybody know why?
  15. That would be nice but can you please tell me how to find the path and the current filename of the file I'm editing? Using FIleCopy I have to go to Windows Explorer, copy the filename and insert it in a input box invoked from the backup_function, isn't it?
×
×
  • Create New...