PageSourceSearch

https://helgesver.re/_next/static/chunks/pages/articles/archive/20…-in-circles-with-autoit-aae47b1850465dfc.js

js helgesver.re collected 2026-10-03 23:55:51 UTC 10,038 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3803],{8953:(e,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/articles/archive/2016/02/how-to-move-your-mouse-cursor-in-circles-with-autoit",function(){return s(16889)}])},16889:(e,n,s)=>{"use strict";s.r(n),s.d(n,{default:()=>c,meta:()=>o});var a=s(37876),t=s(91668),r=s(26090);let o={author:"Helge Sverre",title:"How To Move Your Mouse Cursor In Circles With AutoIt",date:"2016-02-15",description:"AutoIt script tutorial for programmatically moving the mouse cursor in circular patterns."},i=e=>(0,a.jsx)(r.T,{meta:o,...e});function l(e){let n={a:"a",code:"code",p:"p",pre:"pre",span:"span",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"Just a quick and simple little script that will make your mouse cursor rotate around the center of your screen for 5\nseconds or so."}),"\n",(0,a.jsxs)(n.p,{children:["You need ",(0,a.jsx)(n.a,{href:"https://www.autoitscript.com",children:"AutoIT"})," to compile and run it."]}),"\n",(0,a.jsx)(n.pre,{className:"language-autoit",children:(0,a.jsxs)(n.code,{className:"language-autoit",children:[(0,a.jsx)(n.span,{className:"token keyword",children:"Local"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$radius"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token number",children:"300"}),"\n",(0,a.jsx)(n.span,{className:"token keyword",children:"Local"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$originX"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token variable",children:"@DeskTopWidth"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"/"})," ",(0,a.jsx)(n.span,{className:"token number",children:"2"}),"\n",(0,a.jsx)(n.span,{className:"token keyword",children:"Local"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$originY"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token variable",children:"@DeskTopHeight"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"/"})," ",(0,a.jsx)(n.span,{className:"token number",children:"2"}),"\n\n",(0,a.jsx)(n.span,{className:"token keyword",children:"For"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$i"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token number",children:"0"})," ",(0,a.jsx)(n.span,{className:"token keyword",children:"To"})," ",(0,a.jsx)(n.span,{className:"token number",children:"500"})," ",(0,a.jsx)(n.span,{className:"token keyword",children:"Step"})," ",(0,a.jsx)(n.span,{className:"token number",children:"1"}),"\n\n ",(0,a.jsx)(n.span,{className:"token keyword",children:"Local"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$angle"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$i"}),"\n\n ",(0,a.jsx)(n.span,{className:"token keyword",children:"Local"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$X"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$originX"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"+"})," ",(0,a.jsx)(n.span,{className:"token function",children:"sin"}),(0,a.jsx)(n.span,{className:"token punctuation",children:"("}),(0,a.jsx)(n.span,{className:"token variable",children:"$angle"}),(0,a.jsx)(n.span,{className:"token operator",children:"/"}),(0,a.jsx)(n.span,{className:"token number",children:"7"}),(0,a.jsx)(n.span,{className:"token punctuation",children:")"})," \\",(0,a.jsx)(n.span,{className:"token operator",children:"*"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$radius"}),(0,a.jsx)(n.span,{className:"token comment",children:";"}),"\n ",(0,a.jsx)(n.span,{className:"token keyword",children:"Local"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$Y"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"="})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$originY"})," ",(0,a.jsx)(n.span,{className:"token operator",children:"+"})," ",(0,a.jsx)(n.span,{className:"token function",children:"cos"}),(0,a.jsx)(n.span,{className:"token punctuation",children:"("}),(0,a.jsx)(n.span,{className:"token variable",children:"$angle"}),(0,a.jsx)(n.span,{className:"token operator",children:"/"}),(0,a.jsx)(n.span,{className:"token number",children:"7"}),(0,a.jsx)(n.span,{className:"token punctuation",children:")"})," \\",(0,a.jsx)(n.span,{className:"token operator",children:"*"})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$radiu
1s"}),(0,a.jsx)(n.span,{className:"token comment",children:";"}),"\n\n ",(0,a.jsx)(n.span,{className:"token function",children:"MouseMove"}),(0,a.jsx)(n.span,{className:"token punctuation",children:"("}),(0,a.jsx)(n.span,{className:"token variable",children:"$x"}),(0,a.jsx)(n.span,{className:"token punctuation",children:","})," ",(0,a.jsx)(n.span,{className:"token variable",children:"$y"}),(0,a.jsx)(n.span,{className:"token punctuation",children:","})," ",(0,a.jsx)(n.span,{className:"token number",children:"0"}),(0,a.jsx)(n.span,{className:"token punctuation",children:")"}),"\n\n ",(0,a.jsx)(n.span,{className:"token function",children:"sleep"}),(0,a.jsx)(n.span,{className:"token punctuation",children:"("}),(0,a.jsx)(n.span,{className:"token number",children:"1"}),(0,a.jsx)(n.span,{className:"token punctuation",children:")"}),"\n\n",(0,a.jsx)(n.span,{className:"token keyword",children:"Next"}),"\n"]})}),"\n",(0,a.jsx)(n.p,{children:"Great fun c:"})]})}function c(e={}){return(0,a.jsx)(i,{...e,children:(0,a.jsx)(l,{...e})})}},26090:(e,n,s)=>{"use strict";s.d(n,{T:()=>x});var a=s(37876),t=s(33660),r=s(48230),o=s.n(r),i=s(34824),l=s(91668),c=s(14232);function d({id:e,host:n,repo:t,repoId:r,category:o,categoryId:i,mapping:l,term:p,strict:m,reactionsEnabled:h,emitMetadata:u,inputPosition:x,theme:j,lang:k,loading:N}){let[g,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{g||s.e(5485).then(s.bind(s,5485)).then(()=>b(!0))},[]),g?(0,a.jsx)("giscus-widget",{id:e,host:n,repo:t,repoid:r,category:o,categoryid:i,mapping:l,term:p,strict:m,reactionsenabled:h,emitmetadata:u,inputposition:x,theme:j,lang:k,loading:N}):null}let p=new Set(["theme-kde","theme-win95","theme-aqua","theme-y2k","theme-nrk","theme-rema1000","theme-steria","theme-construction"]);function m(){let e=p.has(document.body.className)?"light":"dark",n=`@import url("https://giscus.app/themes/${e}.css");.gsc-header{display:none!important;}`;return`data:text/css;base64,${btoa(n)}`}function h(){let[e,n]=(0,c.useState)("dark");return(0,c.useEffect)(()=>{n(m());let e=new MutationObserver(()=>{n(m())});return e.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>e.disconnect()},[]),(0,a.jsx)(d,{repo:"HelgeSverre/blog-comments",repoId:"R_kgDOSERevw",category:"Announcements",categoryId:"DIC_kwDOSERev84C6-o_",mapping:"pathname",reactionsEnabled:"0",emitMetadata:"0",inputPosition:"top",theme:e,lang:"en",loading:"lazy"})}let u={pre:function({children:e,...n}){let s=(0,c.useRef)(null),[t,r]=(0,c.useState)(!1),[o,i]=(0,c.useState)(!0),l=async()=>{let e=s.current?.innerText??"";try{if(!navigator.clipboard)return void i(!1);await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1500)}catch{i(!1)}};return(0,a.jsxs)("div",{className:"code-block",children:[(0,a.jsx)("pre",{ref:s,...n,children:e}),o&&(0,a.jsx)("button",{type:"button",className:"code-block__copy",onClick:l,"aria-label":t?"Copied":"Copy code",children:t?"Copied!":"Copy"})]})}};function x({children:e,meta:n,isRssFeed:s=!1}){let r=(0,i.useRouter)();if(s)return e;let c=n?.slug??function(e){let n=(e?.asPath||"").split("?")[0].split("#")[0],s="/articles/";if(n.startsWith(s))return n.slice(s.length).replace(/\/$/,"")}(r),d=new Date(n.date)<=new Date(2022,1,1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.G,{title:`${n.title} - Helge Sverre`,headline:n.title,description:n.description,path:c?`/articles/${c}`:void 0,image:c?`/og/article-${c}.png`:void 0,imageAlt:n.title,kind:"BlogPosting",date:n.date,modified:n.dateModified,author:n.author}),(0,a.jsx)("div",{style:{marginBottom:"8px"},children:(0,a.jsx)(o(),{href:"/articles",style:{color:"#667788",fontSize:"10px"},children:"\xab Back to articles"})}),d&&(0,a.jsxs)("div",{className:"old-post-disclaimer",children:[(0,a.jsx)("b",{children:"Content Notice!"})," This post is really old, and no longer reflects my skill level, views or opinions. It is made available here for archival purposes (it was originally on my old WordPress blog). Keep that in mind when you read the contents within."]}),(0,a.jsx)("div",{className:"content-header",children:n.title}),(0,a.jsx)("div",{style:{color:"#666688",fontSize:"10px",marginTop:"4px",marginBottom:"12px"},children:function(e){if(!e)return"No date";let n=new Date(`${e}T00:00:00Z`);return isNaN(n.getTime())?"Invalid date":n.toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"})}(n.date)}),(0,a.jsx)("div",{className:"article-content",children:n.disableCodeCopy?e:(0,a.jsx)(l.x,{components:u,children:e})}),!1!==n.comments&&(0,a.jsx)("div",{id:"comments",style:{marginTop:"24px"},children:(0,a.jsx)(h,{})}),(0,a.jsx)("br",{}),(0,a.jsx)("hr",{}),(0,a.jsx)("div",{style:{marginTop:"8px"},children:(0,a.jsx)(o(),{href:"/articles",style:{color:"#667788",fontSize:"10px"},children:"\xab Back to articles"})}),(0,a.jsx)("br",{})]})}},91668:(e,n,s)=>{"use strict";s.d(n,{R:()=>o,x:()=>i});var a=s(14232);let t={},r=a.createContext(t);function o(e){let n=a.useContext(r);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),a.createElement(r.Provider,{value:n},e.children)}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=8953)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.