Jump to content

theAutoitSpammer

Active Members
  • Posts

    46
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

theAutoitSpammer's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks Yashied I just saw your response because I was busy trying to solve the problem and since I only need to goto line in SciTE, I came out with this (see below) It works in any resolution, zoom and window size and position (at least so far) I haven't try yours yet, but I'm almost sure it will work (not sure it will work in Scite). I really appreciate your help. By the way, you guys in Moscow need a lesson or two in English because I'm sure you meant "busy" instead of "lazy" local $Line = 20 _move_caret_SciTE($Line) Func _move_caret_SciTE($moveL) Local $L1, $L2, $Ydiff, $yMove Opt("CaretCoordMode", 2) ControlSend("[CLASS:SciTEWindow]", "", "Scintilla1", "^{home}") $L1 = WinGetCaretPos() ControlSend("[CLASS:SciTEWindow]", "", "Scintilla1", "{down}") $L2 = WinGetCaretPos() $Ydiff = ($L2[1] - $L1[1]) $yMove = ($moveL - 1) * $Ydiff Sleep(300) ControlClick("[CLASS:SciTEWindow]", "", "Scintilla1", "left", 1, $L1[0], $yMove) EndFunc ;==>_move_caret
  2. Thanks again maybe I'm not making myself clear, I want to move the caret to line 20 and column 5 for instance, on an equally spaced font. how do I translate this into a number of characters since different lines have different amount of characters?. your example adds all characters per line until it reaches 2217 then moves the caret there. What I really want is to move the caret to a specific line and a specific column in autoit editor. Any help is appreciated.
  3. Thanks for the replay but this functions do not move the caret to a line and column, they move the caret by caracter index. Any other ideas??
  4. is there a function like _moveCaret($handle,"line","column") ??????? or a method to do so??
  5. I know you can find the line number at the cursor(caret) with "@ScriptLineNumber" but how can you MOVE the cursor(caret) to a specific line number in SciTE (w/o using "go to line window") from an autoit exe. thanks in advance Al Anyone?? at least let me know if its possible
  6. thanks Auth I'll try as soon as I comeback from a 10 day business trip. Al
  7. Thanks John, but..... your original script works fine when opening an existing book or creating a new book and then activate the cell from autoit. The problem is that the workbook is already open then select a cell with the mouse and when I run the script it will get the cell row number and process it. When you script a line in excel macro like [row1=selection.cells.row] works fine, why can't this work in autoit?---- $row=$oExcel.selection.cells.row The second problem is when I open (from excel) another book and try to do the same, then I get the wrong (previous) book name. I hope that you or anyone can solve this because I'm lost. thanks again Al
  8. yes I do, but how do you know that????? follow this: 1- I create book1 from scratch after reboot 2- run the script 3- $title is book1.xlsx, isObj=1, $oExcel.name=book1.xlsx 4- then "$Row = $oExcel.selection.cells.row" returns an error (a=selection.cells.row works in excel) then 1- open book2 2- title=book2 3- isObj=1 4- but $oExcel.name=book1.xlsx not book2 ???????????????? 5- after that who cares by the way i'm using excel 2007 which sucks!!! help...script follows ;---------------------------- #include <Excel.au3> ;----------------------------- $title = WinGetTitle('Microsoft Excel') MsgBox(0, "", $title) $oExcel = _ExcelBookAttach($title, "Title") ;with $s_mode = "Title" ==> Title of the Excel window MsgBox(0, "", IsObj($oExcel)) _ExcelWriteCell($oExcel, "If you can read this, then Success!", 1, 1) ;Write to the Cell Sleep(2000) WinActivate($title) MsgBox(0, "", $oExcel.name) $Row = $oExcel.selection.cells.row ;ActiveCell.Row ;Gets row $Column = $oExcel.selection.cells.column ;ActiveCell.Column ; Gets Column $val = _ExcelReadCell($oExcel, $Row, $Column) MsgBox(0, "", $val) ;--------------------------------
  9. John Sorry to bother you again, I modify your script as follows, but it doesn't work for me (it assumes a workbook is already open and a cell "A1" is selected with the mouse and with value="John"). Can you get it to run? What am I doing wrong? Thanks in advance Al ;---------------------------- #include <Excel.au3> ;----------------------------- $title = WinGetTitle('Microsoft Excel') $oExcel = _ExcelBookAttach($title, "Title") ;with $s_mode = "Title" ==> Title of the Excel window MsgBox(0, "", IsObj($oExcel)) Sleep(2000) WinActivate($title) $Row = $oExcel.ActiveCell.Row ;Gets row $Column = $oExcel.ActiveCell.Column ; Gets Column $val = _ExcelReadCell($oExcel, $Row, $Column) MsgBox(0, "", $val) ;--------------------------------
  10. Thanks Melba it works but the funny thing is that I was messing arround with the same functions before and I couldn't get them to work. I'll have to study your script and find my error. Thanks again Al
  11. Happy to hear it. Please mark your original post with [sOLVED] or [RESOLVED] Al
  12. I'm sorry I should said "within the desktop" (change the position coordinates) in pixels from (x,y) to (x1,y1) How do I select and drag it without knowing the original position
  13. I want to move a link in my desktop from one place to another. can somebody point me in the right direction? Al
  14. EXCEL 2007 SAVES FILES AS 123.XLSX WHEN NOT IN COMPATIBILITY MODE AND YOUR SCRIPT IS TRYING TO LOAD A 123.XLS COULD THAT BE YOUR PROBLEM?
×
×
  • Create New...